/* Страница ленты постов */
.posts-feed-page {
    min-height: calc(100vh - 72px);
    background: var(--body-bg);
    padding-bottom: 3rem;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Основной контент */
.feed-content {
    min-width: 0;
}

/* Заголовок ленты */
.feed-header {
    background: var(--post-bg);
    border-radius: 16px;
    border: 1px solid var(--post-border);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.feed-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

/* Фильтры ленты */
.feed-filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--sidebar-bg);
    border: 1px solid var(--post-border);
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background: var(--input-bg);
    border-color: var(--accent-color);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--accent-color), var(--button-primary-bg));
    border-color: var(--accent-color);
    color: var(--button-primary-text);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.filter-btn svg {
    width: 18px;
    height: 18px;
}

/* Боковая панель */
.feed-sidebar {
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Виджет боковой панели */
.sidebar-widget {
    background: var(--post-bg);
    border-radius: 16px;
    border: 1px solid var(--post-border);
    overflow: hidden;
}

.widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--post-border);
}

.widget-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Рекомендации */
.recommendations-list {
    padding: 0.5rem;
}

.recommendation-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 12px;
    transition: background 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

.recommendation-item:hover {
    background: var(--sidebar-bg);
}

.recommendation-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.recommendation-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), var(--button-primary-bg));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--button-primary-text);
    flex-shrink: 0;
}

.recommendation-info {
    flex: 1;
    min-width: 0;
}

.recommendation-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.125rem;
}

.recommendation-username {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Популярные сообщества */
.communities-list {
    padding: 0.5rem;
}

.community-list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 12px;
    transition: background 0.2s ease;
    text-decoration: none;
}

.community-list-item:hover {
    background: var(--sidebar-bg);
}

.community-list-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.community-list-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-color), var(--button-primary-bg));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--button-primary-text);
    flex-shrink: 0;
}

.community-list-info {
    flex: 1;
    min-width: 0;
}

.community-list-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.125rem;
}

.community-list-members {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Секция постов */
.posts-section {
    width: 100%;
}

/* Загрузка постов */
.posts-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem;
    color: var(--text-secondary);
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-secondary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Пустая лента */
.no-posts {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.no-posts svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-posts h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.no-posts p {
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* ========== АДАПТИВНЫЙ ДИЗАЙН ========== */

/* Планшеты и мобильные */
@media (max-width: 991px) {
    .feed-layout {
        display: block;
    }
    
    .feed-sidebar {
        display: none;
    }
    
    .container {
        max-width: 600px;
    }
}

/* Мобильные */
@media (max-width: 767px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .posts-feed-page {
        min-height: calc(100vh - 60px);
    }
    
    .feed-header {
        padding: 1.25rem 1rem;
        margin-bottom: 1.25rem;
        border-radius: 12px;
    }
    
    .feed-header h1 {
        font-size: 1.25rem;
        margin-bottom: 0.875rem;
    }
    
    .feed-filters {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }
    
    .filter-btn svg {
        width: 16px;
        height: 16px;
    }

    .share-modal {
        max-height: 100vh; 
        display: flex; 
        flex-direction: column;
    }
}

/* Малые мобильные */
@media (max-width: 575px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .feed-header {
        padding: 1rem 0.875rem;
    }
    
    .feed-filters {
        gap: 0.375rem;
    }
    
    .filter-btn {
        flex: 1;
        justify-content: center;
        min-width: 0;
    }
    
    .filter-btn span {
        display: none;
    }
    
    .filter-btn svg {
        margin: 0;
    }

    .share-modal {
        max-height: 100vh; 
        display: flex; 
        flex-direction: column;
    }
}

/* Контейнер постов */
.posts-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Карточка поста */
.post-card {
    background: var(--post-bg);
    border-radius: 16px;
    border: 1px solid var(--post-border);
    overflow: hidden;
    transition: all 0.2s ease;
}

.post-card:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Заголовок поста */
.post-header {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    gap: 0.75rem;
}

.post-author-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.post-author-avatar:hover {
    transform: scale(1.05);
}

.post-author-placeholder {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), var(--button-primary-bg));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--button-primary-text);
    font-size: 0.875rem;
    flex-shrink: 0;
    cursor: pointer;
}

.post-author-info {
    flex: 1;
    min-width: 0;
}

.post-author-name {
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9375rem;
    display: block;
    margin-bottom: 0.125rem;
}

.post-author-name:hover {
    text-decoration: underline;
}

.post-time {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.post-edited {
    font-style: italic;
}

.post-location {
    color: var(--accent-color);
}

.post-menu {
    position: relative;
}

.post-menu-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.post-menu-btn:hover:not(.active) {
    background: var(--sidebar-bg);
    color: var(--text-primary);
}

.post-menu-btn.active {
    background: var(--sidebar-bg);
    color: var(--accent-color);
}

/* Выпадающее меню поста */
.post-dropdown-menu {
    position: fixed;
    background: var(--post-bg);
    border: 1px solid var(--post-border);
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    z-index: 1000;
    overflow: hidden;
    margin-top: 0.5rem;
}

.post-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.2s ease;
    text-align: left;
}

.post-menu-item:hover {
    background: var(--sidebar-bg);
}

.post-menu-item.text-danger {
    color: var(--error-color);
}

/* Контент поста */
.post-content {
    padding: 0 1.25rem 1rem;
}

.post-text {
    color: var(--text-primary);
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 0.9375rem;
    margin-top: 0.75rem;
}

.post-text:first-child {
    margin-top: 0;
}

.post-text a {
    color: var(--accent-color);
    text-decoration: none;
}

.post-text a:hover {
    text-decoration: underline;
}

.post-card.shared-post .post-content > .post-text:last-child {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--post-border);
}

/* Контейнер репоста */
.shared-post-container {
    border: 1px solid var(--post-border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--sidebar-bg);
}

.shared-post-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--post-border);
}

.shared-post-header svg {
    width: 14px;
    height: 14px;
    color: var(--accent-color);
    flex-shrink: 0;
}

.shared-post-header span {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.shared-post-header a {
    color: var(--text-primary);
    font-weight: 600;
    text-decoration: none;
    margin-left: 0.25rem;
}

.shared-post-header a:hover {
    text-decoration: underline;
    color: var(--accent-color);
}

.shared-post-container .post-text {
    padding: 1rem;
    margin: 0;
    background: var(--post-bg);
}

/* Опрос в посте */
.post-poll {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--sidebar-bg);
    border-radius: 12px;
}

.poll-question {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.poll-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.poll-option {
    position: relative;
    padding: 0.75rem 1rem;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow: hidden;
    min-height: 44px;
}

.poll-option:hover:not(.voted) {
    background: var(--post-bg);
    border-color: var(--accent-color);
}

.poll-option.voted {
    cursor: default;
}

.poll-option-text {
    position: relative;
    z-index: 2;
    color: var(--text-primary);
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    max-width: 100%;
    padding-right: 0.5rem; 
}

.poll-option.show-results .poll-option-text {
    padding-right: 4rem;
}

.poll-option-result {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 1rem;
    pointer-events: none;
}

.poll-progress {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: rgba(52, 152, 219, 0.2);
    border-radius: 8px;
    transition: width 0.3s ease;
}

.poll-percentage {
    position: relative;
    z-index: 2;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.poll-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* Форма редактирования поста */
.post-edit-form {
    width: 100%;
}

.post-edit-input {
    width: 100%;
    min-height: 100px;
    padding: 0.75rem;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9375rem;
    resize: vertical;
    outline: none;
}

.post-edit-input:focus {
    border-color: var(--accent-color);
}

.post-edit-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
}

.media-item.vertical-video {
    background: #000;
    max-height: 450px; 
}

.media-item.vertical-video video {
    object-fit: contain;
    max-height: 100%;
    width: auto;
    max-width: 100%;
}

.post-media.media-2 {
    grid-template-columns: repeat(2, 1fr);
    max-height: 400px;
}

.post-media.media-2 .media-item {
    height: 400px;
}

.post-media.media-3 {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 200px);
    max-height: 400px;
}

.post-media.media-4 {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 200px);
    max-height: 400px;
}

.media-item:hover img {
    transform: scale(1.05);
}

/* Файлы в постах */
.post-files {
    margin: 0.75rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    background: var(--sidebar-bg);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s ease;
    border: 1px solid var(--post-border);
    position: relative;
}

.file-item:hover {
    background: var(--button-secondary-bg);
    transform: translateX(4px);
}

.file-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-color), var(--button-primary-bg));
    border-radius: 8px;
    color: var(--button-primary-text);
    flex-shrink: 0;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.file-size {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.125rem;
}

/* Панель взаимодействий */
.post-interaction-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1.25rem;
    border-top: 1px solid var(--post-border);
    background: var(--sidebar-bg);
}

.post-interaction-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.post-interaction-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.post-interaction-item:hover:not([data-disabled="true"]) {
    background-color: rgba(0, 0, 0, 0.05);
}

.post-interaction-item[data-disabled="true"] {
    opacity: 0.6;
    cursor: default;
}

.interaction-like {
    color: #e74c3c;
}

.interaction-like.active {
    color: #e74c3c;
    font-weight: 500;
}

.interaction-comment {
    color: #3498db;
}

.interaction-comment.active {
    color: #3498db;
    font-weight: 500;
}

.interaction-share {
    color: #2ecc71;
}

.interaction-share.active {
    color: #2ecc71;
    font-weight: 500;
}

.interaction-count {
    font-size: 0.875rem;
    font-weight: 500;
}

.post-views {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

.post-interaction-item svg {
    width: 20px;
    height: 20px;
}

/* Комментарии */
.post-comments {
    padding: 0.75rem 1.25rem 1rem;
    background: var(--sidebar-bg);
    border-top: none;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.comments-list:empty {
    display: none;
}

.comments-list::-webkit-scrollbar {
    width: 4px;
}

.comments-list::-webkit-scrollbar-track {
    background: transparent;
}

.comments-list::-webkit-scrollbar-thumb {
    background: var(--post-border);
    border-radius: 2px;
}

.comment {
    display: flex;
    gap: 0.625rem;
    padding: 0.625rem;
    border-radius: 8px;
    transition: background 0.2s ease;
    position: relative;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.comment:hover {
    background: var(--post-bg);
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), var(--button-primary-bg));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--button-primary-text);
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.comment-author {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.8125rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.comment-author:hover {
    color: var(--accent-color);
}

.comment-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.comment-text {
    color: var(--text-primary);
    font-size: 0.875rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.comment-text.editing {
    display: none;
}

.comment-edit-input {
    width: 100%;
    padding: 0.5rem;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.875rem;
    resize: none;
    outline: none;
}

.comment-edit-input:focus {
    border-color: var(--accent-color);
}

/* Действия комментария */
.comment-actions {
    position: absolute;
    top: 0.625rem;
    right: 0.625rem;
    display: none;
    gap: 0.25rem;
}

.comment:hover .comment-actions {
    display: flex;
}

.comment-action-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--post-bg);
    border: 1px solid var(--post-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
}

.comment-action-btn:hover {
    background: var(--sidebar-bg);
    color: var(--text-primary);
}

.comment-action-btn.delete:hover {
    color: var(--error-color);
}

/* Кнопка показать больше комментариев */
.show-more-comments {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem;
    background: var(--post-bg);
    border: 1px solid var(--post-border);
    border-radius: 8px;
    color: var(--accent-color);
    font-weight: 500;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0.75rem;
    margin-left: auto;
    margin-right: auto;
    width: 50%; 
    max-width: 300px;
}

.show-more-comments:hover {
    background: var(--sidebar-bg);
}

/* Форма добавления комментария */
.add-comment {
    display: flex;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--post-border);
    align-items: center;
}

.comment-input-wrapper {
    flex: 1;
}

.comment-input {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 20px;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    outline: none;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.comment-input:focus {
    border-color: var(--accent-color);
    background: var(--post-bg);
}

.comment-submit {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: var(--button-primary-text);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.comment-submit:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.comment-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.comment-submit svg {
    width: 16px;
    height: 16px;
}

/* Лайтбокс для просмотра медиа */
.media-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    flex-direction: column;
    backdrop-filter: blur(10px);
}

.media-lightbox.active {
    display: flex;
}

.lightbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    color: white;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

.lightbox-title {
    font-size: 1.25rem;
    font-weight: 500;
}

.lightbox-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 60px 60px 140px;
}

.lightbox-media-container {
    max-width: 70vw;
    max-height: 70vh; 
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-video {
    max-width: min(90vw, 1200px);
    max-height: 80vh;
    border-radius: 8px;
    background: black;
    object-fit: contain;
}

.lightbox-image-container {
    max-width: 90vw;
    max-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-audio-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem;
}

/* Аудиоплеер в лайтбоксе */
.lightbox-audio-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    min-width: 500px;
    max-width: 90vw;
}

.lightbox-audio-container .modern-audio-player {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.lightbox-audio-container .modern-audio-player:hover {
    background: rgba(255, 255, 255, 0.15);
}

.lightbox-audio-container .audio-title {
    color: white;
    font-size: 1rem;
    text-align: center;
}

.lightbox-audio-container .audio-time {
    color: rgba(255, 255, 255, 0.7);
}

.lightbox-audio-container .volume-btn {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

.lightbox-audio-container .volume-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.lightbox-audio-container .volume-slider-container {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

.audio-visualization {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), var(--button-primary-bg));
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

.lightbox-audio-container.playing .audio-visualization {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

.lightbox-audio-player {
    width: 100%;
    max-width: 400px;
}

.audio-file-name {
    color: white;
    font-size: 1rem;
    text-align: center;
}

.lightbox-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lightbox-counter {
    font-size: 1rem;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.lightbox-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}


.lightbox-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lightbox-author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.lightbox-author-name {
    font-weight: 500;
    color: white;
    text-decoration: none;
}

.lightbox-actions {
    display: flex;
    gap: 0.5rem;
}

.lightbox-action {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.2s ease;
}

.lightbox-action:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
    z-index: 5;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 1rem;
}

.lightbox-next {
    right: 1rem;
}

.lightbox-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.lightbox-thumbnails {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem;
    justify-content: center;
    max-width: 100%;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.3) transparent;
}

.lightbox-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.lightbox-thumbnails::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}

.lightbox-thumbnails::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}

.lightbox-thumbnail {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    opacity: 0.6;
}

.lightbox-thumbnail:hover {
    opacity: 1;
    transform: scale(1.1);
}

.lightbox-thumbnail.active {
    border-color: var(--accent-color);
    opacity: 1;
}

.lightbox-thumbnail img,
.lightbox-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-audio {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-color), var(--button-primary-bg));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.thumbnail-video-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Модальное окно репоста */
.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--sidebar-bg);
    color: var(--text-primary);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-dialog {
    position: relative;
    max-width: 600px;
    margin: 5% auto;
}

.modal-content {
    background: var(--post-bg);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--post-border);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.share-input {
    width: 100%;
    min-height: 100px;
    padding: 0.75rem;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9375rem;
    resize: vertical;
    outline: none;
    margin-bottom: 1rem;
}

.share-post-preview {
    border: 1px solid var(--post-border);
    border-radius: 12px;
    padding: 1rem;
    background: var(--sidebar-bg);
}

.modal-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding: 1.5rem;
    border-top: 1px solid var(--post-border);
}

/* Загрузка постов */
.posts-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem;
    color: var(--text-secondary);
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-secondary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.no-posts {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

/* Уведомления */
.notification-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 2147483647;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.notification {
    background: var(--post-bg);
    border: 1px solid var(--post-border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    min-width: 320px;
    max-width: 420px;
}

.notification.show {
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification-icon {
    flex-shrink: 0;
}
