/* Фон для всей страницы */
body, html {
    background-color: #000; /* Черный цвет для всего фона */
    color: #fff;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    width: 100%;  
}

/* Заголовок */
header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 20px;
    background-color: #1b1b1b;
    width: 100%; /* Изменено с 100vw на 100% */
    position: relative;
}

.title {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    text-align: center;
}


/* Контейнер с аватаркой и информацией о группе */
.group-header {
    background-color:#1b1b1b; /* Серый фон для контейнера с аватаркой и названием группы */
    color: #fff;
    padding: 20px 15px; /* Уменьшенный padding для более компактного размещения */ 
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #1b1b1b;
    margin-top: -22px;
    justify-content: center;
    height: 60px;
    font-size: 14px;
    text-align: center;
    width: 100%;
    position: sticky; /* Делает элемент "липким" при прокрутке */
    top: 0; /* Закрепляет его в верхней части страницы */
    z-index: 1000; /* Устанавливает приоритет по оси Z, чтобы он оставался поверх других элементов */
}

* {  
    box-sizing: border-box; /* Включает паддинги и границы в общую ширину и высоту элементов */  
}

.group-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
}

.group-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.group-name {  
    font-size: 16px;  
    font-weight: bold;  
    color: #fff;  
    margin-bottom: 4px; /* Отступ снизу для отступа между названием группы и участниками */  
    text-align: center; /* По центру, если нужно */  
}  

.group-participants {  
    font-size: 14px;  
    color: #bbb;  
    text-align: center;  
    margin-top: 0; /* Можно оставить или изменить, как нужно */  
}



/* Настройка шрифта и отступов для маленьких экранов */
@media screen and (max-width: 600px) {
    .chat-bubble {
        font-size: 14px; /* Немного уменьшите текст для маленьких экранов */
        padding: 10px 16px;
        max-width: 80%;
    }
}

/* Блок для непрочитанных сообщений */
.unread-container {
    padding-top: 10%; /* Увеличенный отступ сверху */
    padding-bottom: 5px; /* Увеличенный отступ снизу */
    text-align: center;
    font-size: 14px;
    color: #8e8e93;
    margin-bottom: 10px;
}


/* Основной контейнер для поста */
.post-container {
    background-color: #1c1c1e;
    color: #ffffff;
    border-radius: 13px;
    padding: 0 15px 15px 15px; /* Убираем верхний padding */
    margin: 20px auto;
    max-width: 315px; /* Уменьшенная ширина */
    transform: scale(0.9); /* Уменьшение размера на 10% */
    transform-origin: left; /* Точка изменения размера — слева */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px; /* Добавьте отступ для новых публикаций */
}

.post-container.read {
    opacity: 0.7; /* или другой стиль для пометки прочитанного */
}

/* Изображение поста */
.post-image {
    width: calc(100% + 30px); /* Увеличиваем ширину изображения */
    margin-left: -15px; /* Смещаем влево, чтобы изображение совпадало с краями контейнера */
    margin-right: -15px; /* Смещаем вправо, чтобы изображение совпадало с краями контейнера */
    border-radius: 16px 16px 0 0; /* Закругляем верхние углы, нижние - прямые */
}

.post-text {
    font-size: 14px;
    line-height: 1.5;
    margin-top: 10px;
    color: #d1d1d1;
    padding: 7px;
}

.reactions-carousel {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 3px;
    scroll-behavior: smooth;
}

.reactions-carousel::-webkit-scrollbar {
    display: none; /* Скрыть полосу прокрутки */
}

.reaction {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px; /* Увеличение размера для реакции */
    height: 20px; /* Увеличение размера для реакции */
    padding: 5px;
    border-radius: 20px; /* Скругление углов для кругов */
    font-size: 20px; /* Увеличение размера иконок */
    color: #ff6b6b;
    cursor: pointer;
    margin-right: 10px; /* Добавлен отступ между реакциями */
    transition: background-color 0.3s, box-shadow 0.3s;
    margin-bottom: 12px; /* Поднимаем реакции выше текста */
}

reaction-container:hover {
    background-color: rgba(255, 255, 255, 0.2); /* Изменение фона при наведении */
}

.reaction-container .reaction {
    margin-right: 5px; /* Отступ между иконкой и числом */
}

.reaction-container .reaction-count {
    font-weight: bold;
    font-size: 14px;
    display: inline-block; /* Отображение рядом с реакцией */
}

.reaction:hover {
    background-color: rgba(255, 255, 255, 0.2); /* Цвет фона при наведении */
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5); /* Тень для эффекта */
}

.reaction.selected {
    background-color: #0d0d0d; /* Цвет фона для выделенной реакции */
    color: #fff;
    border: 2px solid #007aff; /* Лаконичная обводка для выделенной реакции */
    transform: scale(1.1); /* Легкое увеличение для выделения */
    transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.post-footer {
    display: flex;
    justify-content: flex-end; /* Перемещает элементы вправо */
    align-items: center; /* Центрирует элементы по вертикали */
    margin-top: 10x;
    font-size: 11px;
    color: #ccc;
}

.view-count {
    display: inline-flex;
    align-items: center;
    margin-right: 8px; /* Устанавливает нужное расстояние между количеством просмотров и временем */
    white-space: nowrap;
    line-height: 1; /* Устанавливает единое выравнивание по высоте */
}

.time-stamp {
    white-space: nowrap;
    margin: 0;
    line-height: 1; /* Устанавливает единое выравнивание по высоте */
}






.post-comments {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Выровнять элементы по краям контейнера */
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #818181;
    font-size: 8px;
    position: relative;
    width: 100%; /* Убедитесь, что контейнер занимает всю доступную ширину */
}

.comment-avatars {
    display: flex;
    gap: -10px; /* Накладываем аватары друг на друга */
    margin-right: 10px; /* Увеличенный отступ между аватарами и текстом */
}

.avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid #ffffff;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

.comment-text {
    font-size: 12px;
    color: #007aff;
    display: inline-block;
    margin-right: 10px; /* Отступ между текстом и стрелкой */
    white-space: nowrap;
}

.comment-arrow {
    font-size: 14px;
    color: #007aff;
    margin-left: 90px; /* Отодвигает стрелку вправо */
}

.cropped-image-container {
    width: 100%;
    max-width: 315px; /* Уменьшенная ширина */
    transform: scale(0.9); /* Уменьшение размера на 10% */
    transform-origin: left; /* Точка изменения размера — слева */
    aspect-ratio: 16 / 9; /* Убедитесь, что соотношение сторон соответствует вашим требованиям */
    margin: 0 auto;
    overflow: hidden;
    border-radius: 16px; /* Закругленные углы для соответствия дизайну */
    position: relative;
    margin-top: 10px; /* При необходимости измените */
}

.cropped-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Убедитесь, что изображение заполняет контейнер */
    display: block;
}

.custom-elements {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: fixed; /* Закрепляем элементы */
    right: 20px; /* Горизонтальное выравнивание */
    bottom: 150px; /* Увеличьте значение для поднятия выше */
    z-index: 200; /* Убедитесь, что элементы находятся над другими элементами */
    gap: 30px; /* Пространство между кнопками */
}

.circle-button {
    width: 25px; /* Размер кнопки */
    height: 25px; /* Размер кнопки */
    background-color: #1c1c1c; /* Цвет фона */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cccccc;
    font-size: 15px; /* Размер шрифта */
    cursor: pointer;
}

.circle-button.number {
    background-color: #0986e6c2; /* Blue color for number button */
    color: rgb(255, 255, 255);
    font-weight: bold;
}



.icon-arrow-down::before {
    content: '';
    width: 10px; /* Adjust size as needed */
    height: 10px;
    border: solid #cccccc;
    border-width: 0 3px 3px 0;
    display: inline-block;
    transform: rotate(45deg); /* Downward arrow */
}

.reaction .like-count:empty,
.reaction .fire-count:empty,
.reaction .star-count:empty,
.reaction .laugh-count:empty,
.reaction .sad-count:empty,
.reaction .angry-count:empty,
.reaction .wow-count:empty,
.reaction .thumbsup-count:empty,
.reaction .clap-count:empty,
.reaction .heart-count:empty,
.reaction .cool-count:empty {
    display: none;
}



/* Нижняя панель навигации */
.footer-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
    background-color: #1b1b1b;
    padding: 10px 0;
    z-index: 100; /* Уровень ниже строки ввода сообщений */
}

.footer-nav a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    transition: color 0.3s;
}

.footer-nav a i {
    font-size: 20px;
    margin-bottom: 5px;
}

.footer-nav a.selected {
    color: #007bff;
    font-weight: bold;
}


/* Строка для ввода сообщений */
.message-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background-color: #1c1c1e;
    position: fixed;
    bottom: 55px; /* Над панелью навигации */
    left: 0;
    width: 100%;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    z-index: 200;
}

.message-container {
    padding-bottom: 150px; /* Оставляем место для строки ввода и нижней панели */
    overflow-y: auto; /* Если требуется прокрутка */
    max-height: calc(100vh - 150px); /* Ограничение высоты для прокрутки */
}

.message-input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #555;
    border-radius: 4px;
    margin-right: 10px;
    background-color: #2c2c2e;
    color: #fff;
}

.message-input::placeholder {
    color: #888;
}

.send-button {
    padding: 10px 15px;
    background-color: #007aff;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
}

.send-button:hover {
    background-color: #005fbd;
}

.file-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-right: 10px;
    color: #007aff;
}

.file-label i {
    font-size: 20px;
    color: #007aff;
    margin-right: 5px;
}

#fileInput {
    display: none; /* Скрываем стандартный input для файлов */
}

.file-label i {
    font-size: 20px;
    color: #007aff;
    margin-right: 5px;
}


.message-container {
    background-color: #1c1c1e;
    color: #ffffff;
    border-radius: 16px;
    padding: 15px;
    margin: 20px auto;
    max-width: 315px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.message-content {
    padding-bottom: 10px;
    border-bottom: 1px solid #555;
}

.message-reactions1 {
    display: flex;
    align-items: center;
    margin-top: 10px;
    font-size: 14px;
    gap: 10px;
}

.reaction1 {
    display: flex;
    align-items: center;
    gap: 5px;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: bold;
    color: #ff6b6b;
    cursor: pointer;
    font-size: 13px;
    margin-right: 5px;
}

.view-count1 {
    margin-left: auto;
    font-size: 12px;
    color: #8e8e93;
}

.custom-post-comments {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 8px;
    font-size: 12px;
    position: relative;
    width: 100%;
}

.custom-comment-avatars {
    display: flex;
    gap: -10px;
    margin-right: 10px;
}

.custom-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid #ffffff;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

.custom-comment-text {
    font-size: 12px;
    color: #007aff;
    display: inline-block;
    margin-right: 10px;
    white-space: nowrap;
}

.custom-comment-arrow {
    font-size: 14px;
    color: #007aff;
    margin-left: 90px;
}

.close-video-button {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px;
    cursor: pointer;
    display: none; /* Скрыто по умолчанию */
  }

  .close-video-button:hover {
    background: rgba(0, 0, 0, 0.9);
  }

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.message-input-container {
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    border-radius: 20px;
    padding: 5px 10px;
}

.record-button {
    background-color: #000000;
    border: none;
    color: white;
    padding: 10px;
    border-radius: 50%;
    margin-left: 10px;
    cursor: pointer;
    font-size: 20px;
}

.record-button:hover {
    background-color: #ff7875;
}

.posts-container {
    margin-top: 20px;
}

/* Стили для контейнера голосовых сообщений */
.voice-messages-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 15px 0;
}

/* Стили для отдельного голосового сообщения */
.voice-message-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f0f0f0;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.voice-message-container audio {
    flex-grow: 1;
    margin-right: 10px;
}

.voice-timestamp {
    font-size: 12px;
    color: #555;
}

.content-container{
    padding-bottom: 100px;
}