:root {
    --displayEmojiSizeW: 66px;
    --displayEmojiSizeH: 66px;
}

/* МОДАЛЬНОЕ ОКНО - ПРОСМОТР МЕДИА */
.image-preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    /* Убрано visibility: hidden и pointer-events: none */
}

.image-preview-modal.active {
    opacity: 1;
    display: flex;
    pointer-events: all;
    visibility: visible;
    /* display вынесен в активное состояние */
    /* Убраны лишние свойства */
}

/* Контейнер для изображения */
.image-preview-container {
    position: relative;
    /* Изменено с absolute */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 8px;
    max-width: 90%;
    /* Изменено с width */
    margin: auto;
    /* Добавлено для центрирования */
}

/* Само изображение */
.image-preview {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: transform 0.15s cubic-bezier(0.2, 0, 0.1, 1), opacity 0.15s ease;
    opacity: 0;
    transform: scale(0.95) translateY(10px);
    transform-origin: center;
    cursor: zoom-in;
}

.image-preview.active {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.image-preview.expanded {
    cursor: zoom-out;
    /* Убраны дублирующие свойства */
}

/* Кнопка закрытия (крестик) */
.image-preview-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    z-index: 2001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
    transition: opacity 0.2s ease, background 0.2s ease;
    padding: 0;
}

.image-preview-close img {
    width: 24px;
    height: 24px;
    filter: brightness(1);
    display: block;
}


/* Убраны дубликаты свойств для :hover */
.image-preview-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

/* Кнопки навигации */
.image-preview-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    cursor: pointer;
    z-index: 2001;
    opacity: 0.7;
    transition: opacity 0.2s ease, background 0.2s ease;
    display: none;
    padding: 0;
    align-items: center;
    justify-content: center;
}

.image-preview-nav:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.7);
}

.image-preview-nav.visible {
    display: flex;
}


.image-preview-nav img {
    width: 24px;
    height: 24px;
    filter: brightness(1);
    display: block;
}

.image-preview-nav.visible {
    display: flex;
}

/* Позиции стрелок */
.image-preview-prev {
    left: 20px;
}

.image-preview-next {
    right: 20px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .image-preview-container {
        max-width: 95%;
        /* Увеличено для мобильных */
        touch-action: none;
    }

    .image-preview-close {
        width: 36px;
        height: 36px;
        top: 10px;
        /* Добавлено для мобильных */
        right: 10px;
    }

    .image-preview-nav {
        width: 40px;
        height: 40px;
    }

    .image-preview-prev {
        left: 10px;
        /* Добавлено для мобильных */
    }

    .image-preview-next {
        right: 10px;
        /* Добавлено для мобильных */
    }

    .image-preview-close img {
        width: 20px;
        height: 20px;
    }

    .image-preview-nav img {
        width: 20px;
        height: 20px;
    }

    .image-preview-nav {
        width: 40px;
        height: 40px;
    }
}

/* МОДАЛЬНОЕ ОКНО - ПРОСМОТР МЕДИА */


/* МОДАЛЬНОЕ ОКНО - УДАЛЕНИЕ */
.delete-message-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.delete-message-modal.active {
    display: flex;
}

.modal-message-content {
    font-size: 16px;
    grid-area: content;
    line-height: 1.375;
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    margin-top: -5px;
    max-height: 400px;
    overflow: hidden;
}

/* Контейнер модального окна */
.modal-content {
    background-color: #2b2d31;
    /* Темно-серый цвет фона Discord */
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

/* Заголовок модального окна */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #303236;
    /* Темная граница */
}

.modal-header h2 {
    font-size: 18px;
    color: #ffffff;
    margin: 0;
    font-weight: 600;
}

/* Тело модального окна */
.modal-body {
    padding: 20px;
    color: #ffffff;
    gap: 10px;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: stretch;
}

/* Стили для кнопок внутри модального окна */
.modal-body .buttons {
    display: flex;
    gap: 10px;
}

.modal-body .buttons button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.modal-body .buttons .cancel-btn {
    background-color: #36393f;
    color: var(--text-normal);
}

.modal-body .buttons .cancel-btn:hover {
    background-color: #40444b;
}

.modal-body .buttons .delete-btn {
    background-color: #ed4245;
    /* Красный цвет для удаления */
    color: var(--text-normal);
}

.modal-body .buttons .delete-btn:hover {
    background-color: #ff5c5c;
}

/* МОДАЛЬНОЕ ОКНО - УДАЛЕНИЕ */


/* МОДАЛЬНОЕ ОКНО - СОЗДАНИЕ ЧАТА */

/* Футер модального окна */
.create-chat-modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--background-accent);
    background: var(--background-tertiary);
}

.create-group-button {
    width: 100%;
    background: var(--brand);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.create-group-button:enabled:hover {
    background: var(--brand-hover);
    transform: translateY(-1px);
}

.create-group-button:disabled {
    background: var(--background-accent);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

.create-chat-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.create-chat-modal.active {
    display: flex;
    opacity: 1;
}

/* Контейнер модального окна */
.create-chat-modal-container {
    width: 440px;
    max-height: 80vh;
    background: var(--background-secondary);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Заголовок */
.create-chat-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px;
    border-bottom: 1px solid var(--background-accent);
    background: var(--background-tertiary);
}

/* Секция поиска */
.create-chat-search-section {
    padding: 16px 20px;
    border-bottom: 1px solid var(--background-accent);
}

.create-chat-search-container {
    display: flex;
    gap: 12px;
    align-items: center;
}

.create-chat-search-input {
    flex: 1;
    background: var(--background-primary);
    border: none;
    border-radius: 5px;
    padding: 8px 12px;
    color: var(--text-normal);
    font-size: 14px;
    transition: all 0.2s ease;
}

.create-chat-search-input:focus {
    outline: none;
    border-color: var(--brand-solid);
    box-shadow: 0 0 0 1px var(--brand-experiment);
}

.create-chat-search-input::placeholder {
    color: var(--text-muted);
}

.create-chat-add-friends-button {
    background: var(--brand);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.create-chat-add-friends-button:enabled:hover {
    background: var(--brand-hover);
    transform: translateY(-1px);
}

.create-chat-add-friends-button:disabled {
    background: var(--background-accent);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Список друзей */
.create-chat-friends-list {
    flex: 1;
    overflow-y: auto;
    max-height: 300px;
    padding: 8px 0;
}

.create-chat-friend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.create-chat-friend-item:hover {
    background: var(--background-accent);
}

.create-chat-friend-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.create-chat-friend-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--background-primary);
}

.create-chat-friend-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.create-chat-friend-username {
    color: var(--text-normal);
    font-size: 16px;
    font-weight: 500;
}

/* Кастомный чекбокс */
.create-chat-friend-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-left: 12px;
}

.create-chat-friend-select {
    display: none;
}

.create-chat-friend-checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-muted);
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
}

.create-chat-friend-select:checked+.create-chat-friend-checkmark {
    background: var(--brand);
    border-color: var(--brand-solid);
}

.create-chat-friend-select:checked+.create-chat-friend-checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.create-chat-create-group-button {
    width: 100%;
    background: var(--brand);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.create-chat-create-group-button:enabled:hover {
    background: var(--brand-hover);
    transform: translateY(-1px);
}

.create-chat-create-group-button:disabled {
    background: var(--background-accent);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Кнопка создания чата */
.create-chat-button {
    background: var(--brand);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.create-chat-button:hover {
    background: var(--brand-hover);
}

/* Скроллбар для списка друзей */
.create-chat-friends-list::-webkit-scrollbar {
    width: 6px;
}

.create-chat-friends-list::-webkit-scrollbar-track {
    background: transparent;
}

.create-chat-friends-list::-webkit-scrollbar-thumb {
    background: var(--background-accent);
    border-radius: 3px;
}

.create-chat-friends-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.create-chat-modal-title-section {
    flex: 1;
}

.create-chat-modal-title {
    margin: 0 0 4px 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-bright);
    line-height: 1.2;
}

.create-chat-modal-subtitle {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.3;
    display: none;
}

.modal-close-btn {
    width: 35px;
    height: 35px;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s ease;
    margin-left: 16px;
    flex-shrink: 0;
}

.modal-close-btn:hover {
    background: var(--background-accent);
    color: var(--text-bright);
}


/* МОДАЛЬНОЕ ОКНО - СОЗДАНИЕ ЧАТА */

/* МОДАЛЬНОЕ ОКНО - SYMBOL MENU */
/* Контейнер модального окна */
.symbol-modal {
    position: absolute;
    width: 400px;
    height: 520px;
    background: var(--background-secondary);
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    bottom: calc(100% + 8px);
    right: 16px;
    left: auto;
    top: auto;
}

/* Заголовок с табами */
.symbol-modal-header {
    display: flex;
    border-bottom: 0.1px solid var(--background-tertiary);
    background: var(--background-primary);
    padding: 0 8px;
}

.symbol-tab {
    flex: 1;
    padding: 12px 8px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-muted);
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    margin: 0 4px;
}

.symbol-tab:hover {
    background: var(--background-modifier-hover);
    border-radius: 4px 4px 0 0;
}

.symbol-tab.active {
    color: var(--brand-experiment);
    border-bottom: 2px solid var(--brand-experiment);
}

/* Тело модального окна */
.symbol-modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Контент табов */
.tab-content {
    flex: 1;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.tab-content.active {
    display: flex;
}

/* Стили для эмодзи */
.emojis-container {
    overflow: auto;
    margin: 6px;
    /* Стили скроллбара для Firefox */
    scrollbar-width: thin;
    scrollbar-color: var(--background-accent) var(--background-tertiary);
}

.emoji-category {
    margin: 0 8px 12px;
}

.emoji-category-header {
    padding: 8px 12px;
    font-size: 12px;
    font-family: var(--font-code);
    color: var(--text-secondary);
    font-weight: 600;
}

.emoji-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px;
}

/* === Контейнер для масштабирования === */
.emoji-wrapper {
    width: var(--displayEmojiSizeW);
    height: var(--displayEmojiSizeH);
    position: relative;
    display: inline-block;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 8px;
    /* Размер задаётся здесь */
}

.emoji-wrapper:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    background: var(--bg-hover);
}

.emoji-item {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.emoji-item img {
    width: 100%;
    height: 100%;
    object-fit: none;
    object-position: var(--pos-x) var(--pos-y);
    image-rendering: pixelated;
    /* для пиксельных эмодзи */
    transition: transform 0.15s ease;
}

/* Стили для стикеров */
.stickers-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.stickers-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px;
    background: var(--background-secondary);
    /* Стили скроллбара для Firefox */
    scrollbar-width: thin;
    scrollbar-color: var(--background-accent) var(--background-tertiary);
    margin: 6px;
}

.sticker-category {
    margin-bottom: 8px;
}

.sticker-category-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    border-radius: 4px;
}

.category-name {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    padding: 0 8px;
    font-family: var(--font-code);
}

.edit-sticker-set {
    background: none;
    border: none;
    color: var(--brand-experiment);
    font-size: 11px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    font-weight: 500;
    display: none;
}

.edit-sticker-set:hover {
    background: var(--background-modifier-hover);
}

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

.sticker-item {
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
    background: var(--background-primary);
    border: 1px solid transparent;
    place-items: center;
    display: grid;
}

.sticker-item:hover {
    background: var(--background-modifier-hover);
    border-color: var(--brand-experiment);
}

.sticker-item img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.delete-sticker-set {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--status-danger);
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s ease;
    transform: scale(0.8);
}

.sticker-item:hover .delete-sticker-set {
    opacity: 1;
    transform: scale(1);
}

.delete-sticker-set:hover {
    background: var(--status-danger);
    transform: scale(1.1);
}

.delete-sticker-set img {
    width: 10px;
    height: 10px;
    filter: brightness(0) invert(1);
}

/* Панель наборов стикеров */
.symbol-sets-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 45px;
    border-top: 1px solid var(--background-tertiary);
    background: var(--background-primary);
    padding: 8px;
    min-height: 45px;
}

.symbol-sets-list {
    display: flex;
    gap: 8px;
    flex-grow: 1;
    overflow-x: auto;
    overflow-y: hidden;
    /* Скрываем скроллбар, но сохраняем возможность прокрутки */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE и Edge */
}

/* Скрываем скроллбар для WebKit браузеров (Chrome, Safari) */
.symbol-sets-list::-webkit-scrollbar {
    display: none;
}

.symbol-set-item {
    flex-shrink: 0;
    width: 35px;
    height: 35px;
    border-radius: 6px;
    cursor: pointer;
    padding: 0.5px;
    transition: all 0.2s ease;
    background: var(--background-secondary);
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.symbol-set-item.active {
    background: var(--brand-experiment);
    border-color: var(--brand-experiment);
}

.symbol-set-item:hover {
    background: var(--background-modifier-hover);
    border-color: var(--brand-experiment);
    transform: scale(1.05);
}

.symbol-set-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
    min-width: 32px;
    min-height: 32px;
}

/* Превью эмодзи в списке категорий */
.symbol-set-item .emoji-wrapper.emoji-set-preview {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 4px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    min-width: 32px;
}

.symbol-set-item .emoji-set-preview .emoji-item {
    width: 66px;
    height: 66px;
    overflow: hidden;
    position: absolute;
    top: 50%;
    left: 50%;
    /* Масштабируем контейнер до размера превью (32px) */
    transform: translate(-50%, -50%) scale(0.4848);
    transform-origin: center center;
}

.symbol-set-item .emoji-set-preview .emoji-item img {
    width: 66px;
    height: 66px;
    object-fit: none;
    object-position: var(--pos-x, 0) var(--pos-y, 0);
    image-rendering: pixelated;
    display: block;
}

.create-sticker-sets-btn {
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 10px;
    border-radius: 3px;
    transition: all 0.2s ease;
    opacity: 0.7;
    flex-shrink: 0;
}

.create-sticker-sets-btn:hover {
    background-color: var(--background-modifier-hover);
    opacity: 1;
}

/* Стили для GIF */
.gifs-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0px 8px 8px 8px;
    background: var(--background-secondary);
    /* Стили скроллбара для Firefox */
    scrollbar-width: thin;
    scrollbar-color: var(--background-accent) var(--background-tertiary);
    margin: 6px;
}

.gifs-search-container {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 10px 4px 10px 4px;
}

.gif-search-input {
    flex: 1;
    background: var(--background-primary);
    border: none;
    padding: 8px 12px;
    color: var(--text-normal);
    font-size: 14px;
    transition: all 0.2s ease;
    border-radius: 5px;
}

.gif-search-input::placeholder {
    color: var(--text-muted);
}

.gif-search-input:focus {
    outline: none;
    box-shadow: 0 0 0 1px var(--brand-experiment);
}

.popular-gifs-section {
    margin-left: 5px;
    padding-bottom: 8px;
}

.popular-gifs-section.disable {
    display: none
}

.gifs-loading {
    display: none;
    padding: 10px;
    justify-content: center;
    align-items: center;
    margin-top: 5px;
}

.gifs-loading.active {
    display: flex;
}


.gifs-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.gifs-section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--accent-color);
    font-family: var(--font-code);
}

.gifs-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    margin-left: 15px;
    border-radius: 3px;
    transition: background-color 0.2s ease;
    display: none;
}

.gifs-close-btn.active {
    display: block;
}

.gifs-close-btn:hover {
    background-color: var(--background-modifier-hover);
}

.gifs-close-btn:hover .gifs-action-icon {
    filter: brightness(1);
}

.gifs-action-icon {
    width: 22px;
    height: 22px;
    display: block;
    filter: brightness(0.8);
}

.gif-sets-panel {
    height: 35px;
    border-top: 1px solid var(--background-tertiary);
    background: var(--background-primary);
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}


.gif-sets-list {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 100%;
    justify-content: center;
    font-size: 12px;
    font-family: var(--font-code);
    font-weight: 600;
    filter: brightness(0.8);
}

.gif-sets-list img {
    height: 15px;
    /* Регулируйте по необходимости */
    width: auto;
    display: block;
}

.gif-sets-panel a {
    text-decoration: none;
    color: inherit;
    display: block;
    /* или inline-block в зависимости от нужного поведения */
}

.gif-sets-panel a:link,
.gif-sets-panel a:visited,
.gif-sets-panel a:hover,
.gif-sets-panel a:active {
    text-decoration: none;
    color: inherit;
    background-color: transparent;
    height: 30px;
    width: 80%;
}

/* Если нужно убрать outline при фокусе */
.gif-sets-panel a:focus {
    outline: none;
    /* или свой кастомный outline */
    /* outline: 2px solid your-color; */
}

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

.gif-item {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
    background: var(--background-primary);
    border: 1px solid transparent;
    place-items: center;
    display: grid;
}

.gif-item:hover {
    border-color: var(--brand-experiment);
}

.gif-item video,
.gif-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* Стили для сообщения "Не найдено" */
.gifs-not-found {
    display: none;
    /* Скрыт по умолчанию */
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    background: var(--background-secondary);
    border-radius: 8px;
    margin: 20px;
}

.gifs-not-found.active {
    display: flex;
    /* Используем flex для центрирования */
    align-items: center;
    justify-content: center;
    min-height: 250px;
    /* Минимальная высота для красивого отображения */
}

.gifs-not-found-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-family: var(--font-code);
}

/* Скроллбар */
.emojis-container::-webkit-scrollbar,
.stickers-content::-webkit-scrollbar,
.gifs-container::-webkit-scrollbar,
.sticker-sets-panel::-webkit-scrollbar {
    width: 6px;
}

.emojis-container::-webkit-scrollbar-track,
.stickers-content::-webkit-scrollbar-track,
.gifs-container::-webkit-scrollbar-track,
.sticker-sets-panel::-webkit-scrollbar-track {
    background: var(--background-tertiary);
    border-radius: 3px;
}

.emojis-container::-webkit-scrollbar-thumb,
.stickers-content::-webkit-scrollbar-thumb,
.gifs-container::-webkit-scrollbar-thumb,
.sticker-sets-panel::-webkit-scrollbar-thumb {
    background: var(--background-accent);
    border-radius: 3px;
}

.emojis-container::-webkit-scrollbar-thumb:hover,
.stickers-content::-webkit-scrollbar-thumb:hover,
.gifs-container::-webkit-scrollbar-thumb:hover,
.sticker-sets-panel::-webkit-scrollbar-thumb:hover {
    background: var(--brand-experiment);
}

/* Адаптивность для мобильных устройств */


/* ВХОДЯЩИЙ ЗВОНОК */

/* Модальное окно входящего звонка */
.incoming-call-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    backdrop-filter: blur(5px);
}

.incoming-call-modal.active {
    display: flex;
    animation: modal-fade-in 0.3s ease-out;
}

@keyframes modal-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.call-modal-content {
    background-color: #2a2c34;
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    min-width: 300px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: modal-scale-in 0.3s ease-out;
}

@keyframes modal-scale-in {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.call-avatar-container {
    margin-bottom: 20px;
}

.call-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #40444b;
}

.call-username {
    color: #ffffff;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    font-family: 'Whitney', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.call-subtitle {
    color: #b9bbbe;
    font-size: 16px;
    margin-bottom: 30px;
    font-family: 'Whitney', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.call-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.call-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
}

.call-btn:hover {
    transform: scale(1.1);
}

.call-btn:active {
    transform: scale(0.95);
}

.decline-btn {
    background-color: #ed4245;
}

.decline-btn:hover {
    background-color: #c03537;
    box-shadow: 0 0 0 8px rgba(237, 66, 69, 0.2);
}

.accept-btn {
    background-color: #43b581;
}

.accept-btn:hover {
    background-color: #3ca374;
    box-shadow: 0 0 0 8px rgba(67, 181, 129, 0.2);
}

.call-btn-icon {
    width: 24px;
    height: 24px;
    filter: invert(0.8);
}

/* Анимация пульсации для привлекания внимания */
@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }

    80%,
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

.call-modal-content::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px solid #43b581;
    border-radius: 20px;
    animation: pulse-ring 2s ease-in-out infinite;
    pointer-events: none;
}

/* ВХОДЯЩИЙ ЗВОНОК */

@media (max-width: 768px) {
    .gifs-close-btn {
        min-width: 35px;
        min-height: 35px;
    }

    .modal-content {
        max-width: 350px;
    }

    .sticker-item:hover {
        border-color: transparent;
    }

    .symbol-modal {
        width: calc(100vw - 32px);
        right: 16px;
        left: 16px;
        height: 50vh;
        bottom: calc(100% + 4px);
        position: static;
        margin: 4px;
        border-radius: 0px;
        max-height: 350px;
    }

    .symbol-modal.bottom-position {
        top: calc(100% + 4px);
        bottom: auto;
    }

    .emojis-grid {
        grid-template-columns: repeat(7, 1fr);
    }

    .stickers-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .gifs-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .symbol-tab {
        padding: 10px 6px;
        font-size: 13px;
    }
}

/* Анимации */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.symbol-modal.show {
    animation: modalSlideIn 0.2s ease-out;
}

@media (max-width: 400px) {
    .symbol-modal {
        max-height: 250px;
    }
}

/* МОДАЛЬНОЕ ОКНО - SYMBOL MENU */