/* ========== БЛОКИРОВКА ДЛЯ ГОСТЕЙ ========== */
body.guest-mode * {
    pointer-events: none !important;
    cursor: not-allowed !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

/* РАЗРЕШЕННЫЕ ЭЛЕМЕНТЫ (белый список) */
body.guest-mode #user_login,
body.guest-mode #user_login *,
body.guest-mode input[name="login"],
body.guest-mode input[name="password"],
body.guest-mode #user_loginn,
body.guest-mode #user_password,
body.guest-mode #user_login button[type="submit"],
body.guest-mode a[href="/recovery"],
body.guest-mode a[href="/register"],
body.guest-mode [data-target="#registration"],
body.guest-mode [data-toggle="modal"],
body.guest-mode .vk_widget_sidebar,
body.guest-mode .vk_widget_sidebar *,
body.guest-mode .vk_widget_content,
body.guest-mode .vk_widget_content *,
body.guest-mode #vk_groups,
body.guest-mode #vk_groups *,
body.guest-mode iframe[src*="vk.com"],
body.guest-mode iframe[src*="vk.com"] *,
body.guest-mode a[href*="vk.com"],
body.guest-mode #registration,
body.guest-mode #registration *,
body.guest-mode #user_registration,
body.guest-mode #user_registration *,
body.guest-mode .connect-btn,
body.guest-mode [onclick*="connect"],
body.guest-mode .copy-btn,
body.guest-mode [onclick*="copy"] {
    pointer-events: auto !important;
    cursor: pointer !important;
    user-select: auto !important;
}

/* Затемнение заблокированного контента */
body.guest-mode:not(.allowed-section) {
    opacity: 0.85;
    transition: opacity 0.3s;
}

/* Визуальные подсказки для заблокированного (скрываем) */
body.guest-mode a:hover::after,
body.guest-mode button:hover::after {
    display: none !important;
}

/* Баннер для гостей в цветах авторизации */
.guest-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(90deg, #2E2E34, #70A79F);
    color: white;
    text-align: center;
    padding: 12px 15px;
    font-weight: bold;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    animation: slideDown 0.5s ease;
    border-bottom: 2px solid #C58C89;
    font-size: 14px;
}

.guest-banner a {
    color: white !important;
    text-decoration: underline !important;
    font-weight: bold;
    margin: 0 8px;
    pointer-events: auto !important;
    cursor: pointer !important;
}

.guest-banner a:hover {
    color: #C58C89 !important;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

/* Убираем выделение разрешенных элементов */
.allowed {
    border: none !important;
    box-shadow: none !important;
}

/* Стили для иконки "Посетили сегодня" - полная блокировка */
.guest-mode [data-target="#online"] {
    pointer-events: none !important;
    cursor: not-allowed !important;
    opacity: 0.5 !important;
    filter: grayscale(70%) !important;
}

/* Фикс для модального окна Правила чата */
#ruleschat .close {
    pointer-events: auto !important;
    cursor: pointer !important;
}

#ruleschat .modal-header .close span {
    pointer-events: none;
}

/* Защита от копирования */
.guest-mode {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.guest-mode::selection,
.guest-mode *::selection {
    background: transparent !important;
    color: inherit !important;
}

.guest-mode ::-moz-selection {
    background: transparent !important;
    color: inherit !important;
}

/* Разрешаем выделение в полях ввода */
.guest-mode input,
.guest-mode textarea {
    -webkit-user-select: auto !important;
    -moz-user-select: auto !important;
    -ms-user-select: auto !important;
    user-select: auto !important;
}

/* Стили для уведомления о блокировке правого клика */
.context-menu-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background: linear-gradient(90deg, #2E2E34, #70A79F);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 3px solid #C58C89;
    box-shadow: 0 3px 12px rgba(0,0,0,0.3);
    z-index: 10000;
    max-width: 180px;
    animation: slideInRight 0.3s ease-out;
    font-size: 11px;
    font-weight: 500;
    display: none;
}

.context-menu-notification.show {
    display: block;
    animation: slideInRight 0.3s ease-out;
}

.context-menu-notification.hide {
    animation: slideOutRight 0.3s ease-in forwards;
}

/* КОРОТКОЕ ВЫДВИЖЕНИЕ - всего 30px */
@keyframes slideInRight {
    from {
        transform: translateX(30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(30px);
        opacity: 0;
    }
}

/* Анти-спам таймер для уведомлений */
.context-menu-cooldown {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(197, 140, 137, 0.9);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    z-index: 10001;
    display: none;
}