.clip-comment-reply .clip-comment-avatar {
    width: 28px;
    height: 28px;
}

.clip-comment-reply .clip-comment-avatar-placeholder {
    width: 28px;
    height: 28px;
    font-size: 11px;
}

/* Поле ввода ответа */
.clip-reply-input-wrapper {
    display: flex;
    gap: 8px;
    margin-left: 48px;
    margin-top: 8px;
    margin-bottom: 12px;
}

.clip-reply-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 8px 16px;
    color: white;
    font-size: 13px;
    outline: none;
}

.clip-reply-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: #FF0050;
}

.clip-reply-submit {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #FF0050;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.2s ease;
}

.clip-reply-submit:hover {
    transform: scale(1.1);
    background: #FF1744;
}

/* Поле ввода комментария */
.clip-comment-input-wrapper {
    display: flex;
    gap: 10px;
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.5);
}

.clip-comment-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 10px 20px;
    color: white;
    font-size: 14px;
    outline: none;
}

.clip-comment-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.clip-comment-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: #FF0050;
}

.clip-comment-submit {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.clip-comment-submit:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

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

.post-clips .clip-stats {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    gap: 16px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 20px;
}

.post-clips .clip-stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: white;
    font-size: 13px;
    font-weight: 500;
}

.post-clips .clip-stat-item svg {
    width: 16px;
    height: 16px;
}

/* Загрузка */
.clip-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
}

.clip-loader-spinner {
    width: 100%;
    height: 100%;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #FF0050;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.post-clips {
    margin: 0.75rem 0;
    background: #000;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.post-clips .clip-container {
    position: relative;
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
    aspect-ratio: 9/16;
    max-height: 500px;
    background: #000;
    overflow: hidden;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-clips .clip-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: contain;
    background: #000;
    cursor: pointer;
    border-radius: 0;
    width: 100%;
    height: 100%;
}

.clip-viewer .clip-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: contain;
    background: #000;
    width: 100%;
    height: 100%;
}

.post-clips .clip-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 100%);
    z-index: 10;
}

.post-clips .clip-author-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.post-clips .clip-author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.post-clips .clip-author-details {
    flex: 1;
}

.post-clips .clip-author-name {
    color: white;
    font-size: 14px;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    display: block;
    text-decoration: none;
}

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

.post-clips .clip-author-username {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.post-clips .clip-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #FF0050, #FF4500);
    color: white;
    padding: 5px 10px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 11;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(255, 0, 80, 0.3);
}

.post-clips .clip-badge svg {
    width: 14px;
    height: 14px;
}

.post-clips .clip-info {
    position: absolute;
    bottom: 60px;
    left: 12px;
    right: 60px;
    z-index: 10;
}

.post-clips .clip-description {
    color: white;
    font-size: 13px;
    line-height: 1.4;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    max-height: 60px;
    overflow: hidden;
    margin-bottom: 8px;
}

.post-clips .clip-action-btn.liked svg {
    fill: #FF0050;
}

.post-clips .clip-action-btn svg {
    width: 22px;
    height: 22px;
}

.post-clips .clip-action-count {
    color: white;
    font-size: 12px;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.post-clips .clip-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    z-index: 10;
    pointer-events: all;
}

.post-clips .clip-progress-bar {
    position: relative;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    cursor: pointer;
    margin-bottom: 8px;
}

.post-clips .clip-progress-bar:hover {
    height: 6px;
}

.post-clips .clip-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: #FF0050;
    border-radius: 2px;
    width: 0%;
    pointer-events: none;
}

.post-clips .clip-controls-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-clips .clip-time {
    color: white;
    font-size: 11px;
    font-weight: 500;
}

.post-clips .clip-control-buttons {
    display: flex;
    gap: 8px;
}

.post-clips .clip-control-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.2s ease;
}

.post-clips .clip-control-btn:hover {
    background: rgba(52, 152, 219, 0.4);
    border-color: rgba(52, 152, 219, 0.6);
}

.post-clips .clip-control-btn svg {
    width: 16px;
    height: 16px;
}

.post-clips .clip-play-overlay {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(20, 20, 20, 0.8));
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.post-clips .clip-play-overlay:hover {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.7), rgba(41, 128, 185, 0.7));
    transform: translate(-50%, -50%) scale(1.1);
}

.post-clips .clip-play-overlay.show {
    opacity: 1;
}

.post-clips .clip-play-overlay svg {
    width: 24px;
    height: 24px;
    fill: white;
    margin-left: 2px;
}

.post-clips .clip-expand-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 8;
    width: 100%;
    height: 100%;
    cursor: pointer;
    background: transparent;
    border: none;
}

.clip-viewer .clip-player-container {
    width: 100%;
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    max-width: none; 
}

.post-clips .clip-actions {
    position: absolute;
    right: 12px;
    bottom: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    z-index: 10;
}

.post-clips .clip-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.post-clips .clip-action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.2s ease;
}

.post-clips .clip-action-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.post-clips .clip-action-btn.liked {
    background: linear-gradient(135deg, rgba(255, 0, 80, 0.3), rgba(255, 69, 0, 0.3));
    border-color: #FF0050;
    color: #FF0050;
}

.post-clips .clip-action-btn.liked:hover {
    background: linear-gradient(135deg, rgba(255, 0, 80, 0.4), rgba(255, 69, 0, 0.4));
    box-shadow: 0 0 20px rgba(255, 0, 80, 0.5);
}

.post-clips .clip-action-item:nth-child(4) .clip-action-btn {
    cursor: default;
    pointer-events: none;
}

.post-clips .clip-action-item:nth-child(4) .clip-action-btn:hover {
    transform: none;
    background: transparent;
}

.post-clips .clip-action-item:last-child .clip-action-btn {
    background: rgba(255, 255, 255, 0.1);
}

.post-clips .clip-action-item:last-child .clip-action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.post-clips .clip-action-item:last-child .clip-action-count {
    display: none;
}

.post-clips .clip-badge,
.clip-viewer .clip-badge {
    display: none !important;
}

.clip-follow-btn.following {
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.clip-follow-btn.following:hover {
    background-color: rgba(var(--danger-rgb), 0.1);
    color: var(--danger);
    border-color: var(--danger);
}

.spinner-small {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s linear infinite;
}

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

.community-sidebar-wrapper {
    display: none !important;
}

.content-layout .community-sidebar {
    display: block;
    position: sticky;
    top: 80px;
    height: fit-content;
}

/* Планшеты */
@media (max-width: 1199px) {
    .content-layout {
        grid-template-columns: 2fr 1fr;
        gap: 1.5rem;
    }
    
    .community-avatar {
        width: 140px;
        height: 140px;
    }
    
    .community-avatar-placeholder {
        width: 140px;
        height: 140px;
    }
    
    .community-cover {
        height: 320px;
    }
    
    .gallery-item {
        width: 160px;
        height: 160px;
    }
}

/* Планшеты и мобильные устройства */
@media (max-width: 991px) {
    /* Изменяем структуру для мобильных */
    .content-layout {
        display: block;
    }
    
    .content-layout .community-sidebar {
        display: none !important;
    }
    
    .community-sidebar-wrapper {
        display: flex !important;
        flex-wrap: wrap;
        gap: 1.5rem;
        margin-bottom: 2rem;
        width: 100%;
    }
    
    .community-sidebar-wrapper .stories-section,
    .community-sidebar-wrapper .friends-widget {
        flex: 1;
        min-width: 300px;
    }
    
    /* Уменьшаем отступы */
    .container {
        max-width: 600px;
    }
    
    /* Аватар профиля */
    .community-avatar {
        width: 140px;
        height: 140px;
    }
    
    .community-avatar-placeholder {
        width: 140px;
        height: 140px;
    }
    
    /* Обложка профиля */
    .community-cover {
        height: 300px;
    }
    
    /* Шапка профиля */
    .community-avatar-section {
        gap: 1rem;
    }
    
    .community-details {
        padding-top: 1rem;
    }
    
    .community-actions {
        padding-top: 1rem;
    }
    
    /* Медиа-галерея */
    .gallery-carousel {
        gap: 0.75rem;
        padding-bottom: 1.5rem;
    }
    
    .gallery-item {
        width: 150px;
        height: 150px;
    }
    
    /* Карточка создания поста */
    .create-post-card {
        padding: 1.25rem 1rem;
    }
    
    /* Создание поста - основная секция */
    .create-post-header {
        gap: 0.875rem;
    }
    
    /* Кнопки опций */
    .post-create-options {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

/* Мобильные устройства */
@media (max-width: 767px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .community-page {
        min-height: calc(100vh - 60px);
    }
    
    /* Профиль должен быть одноколоночным */
    .community-sidebar-wrapper {
        display: block !important;
    }
    
    .community-sidebar-wrapper .stories-section,
    .community-sidebar-wrapper .friends-widget {
        width: 100%;
        margin-bottom: 1.5rem;
    }
    
    /* Обложка профиля */
    .community-cover {
        height: 200px;
    }
    
    .btn-change-cover {
        bottom: 1rem;
        right: 1rem;
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }
    
    /* Информация профиля */
    .community-info {
        padding: 0 1rem 1.5rem;
    }
    
    /* Упрощенная мобильная версия профиля */
    .community-avatar-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.75rem;
    }
    
    /* Аватар */
    .community-avatar {
        width: 100px;
        height: 100px;
        border-width: 4px;
    }
    
    .community-avatar-placeholder {
        width: 100px;
        height: 100px;
        border-width: 4px;
        font-size: 2rem;
    }
    
    .btn-change-avatar {
        width: 34px;
        height: 34px;
    }
    
    /* Детали профиля */
    .community-details {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-top: 0.5rem;
    }
    
    .community-name {
        font-size: 1.5rem;
    }
    
    .community-username {
        font-size: 1rem;
    }
    
    /* Мета информация по центру */
    .community-meta {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    /* Действия профиля */
    .community-actions {
        padding-top: 1rem;
        margin: 0 auto;
        justify-content: center;
    }
    
    /* Статистика профиля */
    .community-stats {
        justify-content: center;
        gap: 2rem;
        flex-wrap: wrap;
    }
    
    /* Медиа-галерея */
    .community-media-gallery {
        padding: 1rem;
    }
    
    .gallery-carousel {
        gap: 0.5rem;
    }
    
    .gallery-item {
        width: 120px;
        height: 120px;
    }
    
    /* Карточка создания поста */
    .create-post-card {
        padding: 1rem 0.875rem;
        margin-bottom: 1.25rem;
        border-radius: 12px;
    }
    
    /* Заголовок с аватаром и текстовым полем */
    .create-post-header {
        gap: 0.625rem;
    }
    
    .create-post-avatar,
    .create-post-avatar-placeholder {
        width: 40px;
        height: 40px;
    }
    
    .post-input {
        padding: 0.625rem 0.875rem;
        font-size: 0.875rem;
        min-height: 40px;
    }
    
    /* Опции создания поста */
    .post-create-options {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        padding-top: 0.5rem;
        margin-top: 0.5rem;
    }
    
    .post-option-item {
        padding: 0.5rem 0.5rem;
        font-size: 0.75rem;
        border-radius: 8px;
        justify-content: center;
    }
    
    .post-option-item svg {
        width: 16px;
        height: 16px;
    }
    
    /* Панели опций */
    .post-option-panel {
        padding: 0.875rem;
        border-radius: 10px;
    }
    
    /* Опросы */
    .poll-option-input {
        padding: 0.5rem 0.75rem;
    }
    
    .poll-settings-row {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn-add-option,
    .poll-duration-dropdown,
    .poll-duration-button {
        width: 100%;
    }
    
    /* Действия поста */
    .create-post-actions {
        flex-direction: column;
        gap: 0.875rem;
        padding-top: 0.875rem;
    }
    
    /* Секция вложений */
    .post-attachments {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.625rem;
        width: 100%;
    }
    
    /* Кнопки вложений */
    .attachment-btn {
        width: 100%;
        justify-content: center;
        padding: 0.625rem 0.5rem;
        border-radius: 8px;
        border: 1px solid var(--post-border);
        background: var(--sidebar-bg);
    }
    
    .attachment-btn:hover {
        background: var(--input-bg);
    }
    
    .create-clip-btn {
        width: 100%;
        justify-content: center;
        padding: 0.625rem 0.5rem;
        font-size: 0.8125rem;
        grid-column: span 2;
    }
    
    /* Опции видимости и публикации */
    .post-options {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }
    
    .visibility-dropdown {
        width: 100%;
    }
    
    .visibility-button {
        width: 100%;
        padding: 0.625rem 0.875rem;
        font-size: 0.8125rem;
    }
    
    #publishPost {
        width: 100%;
        padding: 0.75rem;
        font-size: 0.9375rem;
    }
    
    /* Превью вложений */
    .attachments-preview {
        gap: 0.625rem;
        margin-top: 0.5rem;
    }
    
    .attachment-preview {
        width: calc(50% - 0.375rem);
        height: 110px;
    }
    
    /* Карточка поста */
    .post-card {
        border-radius: 12px;
    }
    
    .post-header {
        padding: 0.875rem 1rem;
    }
    
    .post-content {
        padding: 0 1rem 0.75rem;
    }
    
    /* Комментарии */
    .post-comments {
        padding: 0.75rem 1rem;
    }
    
    .comments-list {
        max-height: 300px;
    }

    .comment {
        padding: 0.5rem 0.375rem;
        gap: 0.5rem;
    }
    
    .comment-content {
        flex: 1;
        min-width: 0;
    }
    
    .comment-header {
        gap: 0.375rem;
        flex-wrap: wrap;
    }
    
    .comment-author {
        font-size: 0.8125rem;
        font-weight: 600;
    }
    
    .comment-time {
        font-size: 0.7rem;
    }
    
    .comment-text {
        font-size: 0.8125rem;
        line-height: 1.5;
        word-break: break-word;
    }
    
    /* Футер комментария */
    .comment-footer {
        gap: 0.5rem;
        margin-top: 0.375rem;
    }
    
    .comment-reply-btn,
    .comment-edit-btn,
    .comment-delete-btn {
        font-size: 0.7rem;
        padding: 0.25rem 0.375rem;
    }
    
    /* Действия комментария */
    .comment-actions {
        position: static;
        display: flex;
        gap: 0.25rem;
        margin-top: 0.375rem;
    }
    
    .comment-action-btn {
        width: 28px;
        height: 28px;
    }
    
    /* ОТВЕТЫ НА КОММЕНТАРИИ */
    .comment-replies {
        margin-left: 32px;
        margin-top: 0.5rem;
        padding-left: 0.5rem;
    }
    
    .comment-reply {
        padding-left: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    /* Вложенные ответы (второй уровень) */
    .comment-replies .comment-replies {
        margin-left: 24px;
        padding-left: 0.375rem;
    }
    
    /* Аватары в ответах */
    .comment-reply .comment-avatar,
    .comment-reply .comment-avatar-placeholder {
        width: 28px;
        height: 28px;
        font-size: 0.65rem;
    }
    
    /* ПОЛЕ ВВОДА ОТВЕТА */
    .comment-reply-input-wrapper {
        margin-top: 0.5rem;
        padding: 0.375rem;
        gap: 0.375rem;
        border-radius: 8px;
    }
    
    .comment-reply-input {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
        border-radius: 18px;
        min-height: 34px;
    }
    
    .comment-reply-input::placeholder {
        font-size: 0.75rem;
    }
    
    .comment-reply-submit {
        width: 34px;
        height: 34px;
        flex-shrink: 0;
    }
    
    .comment-reply-submit svg {
        width: 14px;
        height: 14px;
    }
    
    /* Форма добавления комментария */
    .add-comment {
        gap: 0.5rem;
        padding-top: 0.625rem;
    }
    
    .comment-input {
        padding: 0.5rem 0.875rem;
        font-size: 0.8125rem;
        min-height: 36px;
    }
    
    .comment-input::placeholder {
        font-size: 0.75rem;
    }
    
    .comment-submit {
        width: 34px;
        height: 34px;
    }
    
    .comment-submit svg {
        width: 14px;
        height: 14px;
    }
    
    /* Редактирование комментария */
    .comment-edit-input {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }
    
    /* Модерация комментариев */
    .comment-moderate-actions {
        margin-left: 0.375rem;
        gap: 0.25rem;
    }
    
    .comment-moderate-approve,
    .comment-moderate-reject {
        width: 26px;
        height: 26px;
    }
    
    .comment-moderate-approve svg,
    .comment-moderate-reject svg {
        width: 12px;
        height: 12px;
    }
    
    .comment-moderation-badge {
        padding: 2px 5px;
        font-size: 0.625rem;
        margin-left: 0.375rem;
    }
    
    .comment-moderation-badge svg {
        width: 10px;
        height: 10px;
    }
}

/* Малые мобильные устройства */
@media (max-width: 575px) {
    .container {
        padding: 0 0.5rem;
    }
    
    /* Приватный профиль */
    .community-private {
        margin: 2rem auto;
        padding: 2rem 1rem;
    }
    
    /* Обложка профиля */
    .community-cover {
        height: 160px;
    }
    
    /* Аватар */
    .community-avatar {
        width: 80px;
        height: 80px;
    }
    
    .community-avatar-placeholder {
        width: 80px;
        height: 80px;
        font-size: 1.5rem;
    }
    
    .community-avatar-section {
        margin-top: -3rem;
    }
    
    /* Информация профиля */
    .community-name {
        font-size: 1.25rem;
    }
    
    .community-username {
        font-size: 0.875rem;
    }
    
    /* Действия профиля */
    .community-actions {
        padding-top: 1rem;
        flex-direction: column;
        width: 100%;
    }
    
    .community-actions .btn {
        width: 100%;
    }
    
    /* Мета информация */
    .community-meta {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    /* Статистика профиля */
    .community-stats {
        gap: 1.5rem;
    }
    
    /* Медиа-галерея */
    .gallery-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .gallery-tabs {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 0.25rem;
        flex-wrap: nowrap;
    }
    
    .gallery-item {
        width: 100px;
        height: 100px;
    }
    
    /* Блок друзей */
    .friends-widget {
        margin-bottom: 1rem;
    }
    
    .friend-item {
        padding: 0.5rem;
    }
    
    .friend-avatar {
        width: 36px;
        height: 36px;
    }
    
    .friend-name {
        font-size: 0.8125rem;
    }
    
    /* Блок историй */
    .stories-container {
        gap: 0.375rem;
    }
    
    .story-avatar {
        width: 48px;
        height: 48px;
    }
    
    .story-username {
        font-size: 0.6875rem;
    }
    
    /* Комментарии */
    .comment {
        padding: 0.375rem 0.25rem;
        gap: 0.375rem;
    }
    
    .comment-avatar,
    .comment-avatar-placeholder {
        width: 32px;
        height: 32px;
        font-size: 0.7rem;
    }
    
    .comment-replies {
        margin-left: 32px;
    }

    .comment-avatar,
    .comment-avatar-placeholder {
        width: 28px;
        height: 28px;
        font-size: 0.65rem;
    }
    
    .comment-author {
        font-size: 0.75rem;
    }
    
    .comment-time {
        font-size: 0.65rem;
    }
    
    .comment-text {
        font-size: 0.75rem;
        line-height: 1.4;
    }
    
    .comment-footer {
        gap: 0.375rem;
        margin-top: 0.25rem;
    }
    
    .comment-reply-btn,
    .comment-edit-btn,
    .comment-delete-btn {
        font-size: 0.65rem;
        padding: 0.25rem 0.375rem;
    }
    
    /* ОТВЕТЫ */
    .comment-replies {
        margin-left: 24px;
        margin-top: 0.375rem;
        padding-left: 0.375rem;
    }
    
    .comment-replies .comment-replies {
        margin-left: 18px;
        padding-left: 0.25rem;
    }
    
    /* Скрываем кнопку ответа на третьем уровне */
    .comment-replies .comment-replies .comment-reply-btn {
        display: none;
    }
    
    /* Аватары в ответах */
    .comment-reply .comment-avatar,
    .comment-reply .comment-avatar-placeholder {
        width: 24px;
        height: 24px;
        font-size: 0.6rem;
    }
    
    /* Поле ввода ответа */
    .comment-reply-input-wrapper {
        padding: 0.25rem;
        gap: 0.25rem;
        margin-top: 0.375rem;
    }
    
    .comment-reply-input {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
        min-height: 30px;
        border-radius: 15px;
    }
    
    .comment-reply-input::placeholder {
        font-size: 0.7rem;
    }
    
    .comment-reply-submit {
        width: 30px;
        height: 30px;
    }
    
    .comment-reply-submit svg {
        width: 12px;
        height: 12px;
    }
    
    /* Форма добавления комментария */
    .add-comment {
        gap: 0.375rem;
        padding-top: 0.5rem;
    }
    
    .comment-input {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
        min-height: 32px;
        border-radius: 16px;
    }
    
    .comment-input::placeholder {
        font-size: 0.7rem;
    }
    
    .comment-submit {
        width: 32px;
        height: 32px;
    }
    
    .comment-submit svg {
        width: 12px;
        height: 12px;
    }
    
    /* Редактирование */
    .comment-edit-input {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
    }
    
    /* Действия комментария */
    .comment-action-btn {
        width: 24px;
        height: 24px;
    }
    
    .comment-action-btn svg {
        width: 10px;
        height: 10px;
    }
}

/* Особо маленькие экраны */
@media (max-width: 374px) {
    .create-post-card {
        padding: 0.875rem 0.75rem;
    }
    
    .create-post-avatar,
    .create-post-avatar-placeholder {
        width: 36px;
        height: 36px;
    }
    
    .post-create-options {
        gap: 0.375rem;
    }
    
    .post-option-item {
        padding: 0.375rem 0.25rem;
        font-size: 0.6875rem;
    }
    
    .post-option-item svg {
        width: 14px;
        height: 14px;
    }
    
    .attachment-preview {
        width: 100%;
        height: 100px;
    }
    
    /* Вложения в один столбец на очень маленьких экранах */
    .post-attachments {
        grid-template-columns: 1fr;
    }
    
    .create-clip-btn {
        grid-column: span 1;
    }
    
    .gallery-item {
        width: 90px;
        height: 90px;
    }
    
    .gallery-article-item,
    .gallery-album-item,
    .article-create-button,
    .album-create-button {
        width: 110px;
    }
    
    .gallery-article-item,
    .article-create-button {
        height: 170px;
    }
    
    .gallery-album-item,
    .album-create-button {
        height: 110px;
    }
    
    .story-avatar {
        width: 42px;
        height: 42px;
    }
    
    .story-username {
        max-width: 42px;
    }
}

/* ========== АЛЬТЕРНАТИВНАЯ РАСКЛАДКА ДЛЯ IPAD И НЕБОЛЬШИХ ПЛАНШЕТОВ ========== */
@media (min-width: 768px) and (max-width: 991px) and (orientation: portrait) {
    .community-sidebar-wrapper {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    .community-sidebar-wrapper .stories-section,
    .community-sidebar-wrapper .friends-widget {
        min-width: auto;
    }
}

/* ========== УЛУЧШЕНИЯ ДЛЯ АДАПТАЦИИ НА ЛАНДШАФТНЫХ МОБИЛЬНЫХ УСТРОЙСТВАХ ========== */
@media (max-width: 767px) and (orientation: landscape) {
    .community-avatar-section {
        flex-direction: row;
        text-align: left;
        align-items: flex-start;
    }
    
    .community-details {
        text-align: left;
        align-items: flex-start;
    }
    
    .community-meta {
        justify-content: flex-start;
    }
    
    .community-actions {
        margin-left: 0;
        justify-content: flex-start;
    }
    
    .community-cover {
        height: 180px;
    }
    
    .community-stats {
        justify-content: flex-start;
    }
    
    .community-sidebar-wrapper {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    /* Улучшенная адаптация блока создания поста в ландшафтной ориентации */
    .create-post-actions {
        flex-direction: row;
        align-items: center;
    }
    
    .post-attachments {
        width: auto;
        display: flex;
        flex-wrap: wrap;
    }
    
    .post-options {
        flex-direction: row;
        width: auto;
    }
    
    .visibility-dropdown {
        width: auto;
    }
    
    .attachment-preview {
        width: 120px;
        height: 120px;
    }
}

/* ========== УЛУЧШЕНИЯ ДЛЯ БОЛЬШИХ ЭКРАНОВ ========== */
@media (min-width: 1400px) {
    .container {
        max-width: 900px;
    }
    
    .content-layout {
        grid-template-columns: 3fr 1fr;
        gap: 2rem;
    }
    
    .community-cover {
        height: 450px;
    }
    
    .community-avatar {
        width: 180px;
        height: 180px;
    }
    
    .community-avatar-placeholder {
        width: 180px;
        height: 180px;
    }
    
    .community-name {
        font-size: 2.25rem;
    }
}

/* Улучшения для больших мобильных телефонов */
@media (min-width: 400px) and (max-width: 575px) {
    .community-avatar {
        width: 90px;
        height: 90px;
    }
    
    .community-avatar-placeholder {
        width: 90px;
        height: 90px;
    }
    
    .community-cover {
        height: 180px;
    }
}

/* ========== УЛУЧШЕНИЯ ДЛЯ ПЕЧАТИ ========== */
@media print {
    .community-actions,
    .create-post-card,
    .post-interaction-bar,
    .post-comments,
    .community-media-gallery,
    .community-sidebar-wrapper,
    .content-layout .community-sidebar {
        display: none !important;
    }
    
    .content-layout {
        display: block;
    }
    
    .community-page {
        background: white !important;
    }
    
    .community-header {
        box-shadow: none !important;
        border: 1px solid #eee !important;
    }
    
    .post-card {
        page-break-inside: avoid;
        margin-bottom: 2rem;
        border: 1px solid #eee !important;
    }
}

/* ========== РЕТИНА ДИСПЛЕИ ========== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .community-avatar,
    .community-avatar-placeholder,
    .friend-avatar,
    .friend-avatar-placeholder,
    .post-author-avatar,
    .post-author-placeholder,
    .comment-avatar,
    .comment-avatar-placeholder,
    .story-user-avatar,
    .story-user-avatar-placeholder,
    .clip-author-avatar,
    .clip-author-placeholder {
        border-width: 2px;
    }
    
    .community-cover {
        box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    }
}

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

.share-modal {
    max-width: 600px;
    width: 100%;
    margin: 50px auto;
    max-height: 90vh; 
    display: flex; 
    flex-direction: column;
}

/* Лейблы */
.share-modal-label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    letter-spacing: 0.01em;
}

/* Секция выбора места */
.share-destination {
    margin-bottom: 1.5rem;
}

/* Опции типа репоста */
.share-type-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.share-type-option {
    position: relative;
    cursor: pointer;
    margin: 0;
}

.share-type-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.share-type-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border: 2px solid var(--post-border);
    border-radius: 12px;
    transition: all 0.3s ease;
    background: var(--sidebar-bg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

/* Эффект свечения при наведении */
.share-type-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.05), rgba(41, 128, 185, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.share-type-option:hover .share-type-content::before {
    opacity: 1;
}
