.story-report-btn.has-report {
    background: rgba(251, 191, 36, 0.2);
    border-color: rgba(251, 191, 36, 0.3);
}

.story-report-btn.has-report:hover {
    background: rgba(251, 191, 36, 0.3);
    border-color: rgba(251, 191, 36, 0.5);
}

.story-report-btn.has-report svg {
    stroke: #fbbf24;
}

/* Кнопка жалобы на комментарий истории */
.story-comment-report-btn {
    background: none;
    border: none;
    color: var(--error-color);
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.story-comment-report-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}

.story-comment-report-btn.reported {
    color: #fbbf24;
}

.story-comment-report-btn.reported:hover {
    background: rgba(251, 191, 36, 0.1);
}

/* ========== МЕНЮ АЛЬБОМОВ ========== */

.album-menu {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
}

.album-menu-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.2s ease;
    opacity: 0;
}

.gallery-album-item:hover .album-menu-btn {
    opacity: 1;
}

.album-menu-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

/* Жёлтая иконка если жалоба уже отправлена */
.album-menu-btn.has-report {
    color: var(--warning-color, #f39c12);
    opacity: 1;
}

.album-menu-btn svg {
    width: 16px;
    height: 16px;
}

.album-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: 180px;
    z-index: 10000;
    overflow: hidden;
    animation: fadeIn 0.2s ease;
}

.album-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

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

.album-menu-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Красная кнопка удаления */
.album-menu-item-danger {
    color: var(--error-color, #e74c3c);
}

.album-menu-item-danger:hover {
    background: rgba(231, 76, 60, 0.1);
}

/* Жёлтая кнопка если жалоба уже отправлена */
.album-menu-item-reported {
    color: var(--warning-color, #f39c12);
}

.album-menu-item-reported:hover {
    background: rgba(243, 156, 18, 0.1);
}

.album-menu-divider {
    height: 1px;
    background: var(--post-border);
    margin: 4px 0;
}

.album-modal-delete {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--error-color);
    transition: all 0.2s ease;
}

.album-modal-delete:hover {
    background: var(--error-color);
    color: white;
    border-color: var(--error-color);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.album-modal-delete svg {
    width: 20px;
    height: 20px;
}

body:has(.modal:not([style*="display: none"])),
body:has(.album-modal.active),
body:has(.album-create-modal.active),
body:has(.album-select-modal.active),
body:has(.story-modal),
body:has(.story-viewer-modal),
body:has(.clip-viewer.active),
body:has(.media-lightbox.active) {
    overflow: hidden !important;
}

.gallery-album-item .album-info {
    display: none;
}

/* Альбом занимает всю высоту */
.gallery-album-item {
    position: relative;
    width: 180px;
    height: 180px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    cursor: pointer;
    background: var(--post-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--post-border);
}

/* Обложка занимает всю площадь */
.gallery-album-cover {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background: var(--sidebar-bg);
}

/* Новый hover overlay для альбома */
.album-hover-info {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 12px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

.gallery-album-item:hover .album-hover-info {
    opacity: 1;
}

.album-hover-info .album-title {
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 4px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.album-hover-info .album-count {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.75rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.gallery-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
}

.gallery-loading .spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--post-border);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.gallery-loading span {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.album-photo-cover {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0;
    z-index: 2;
}

.album-photo-item:hover .album-photo-cover {
    opacity: 1;
}

.album-photo-cover svg {
    color: #fff;
    transition: all 0.2s ease;
}

.album-photo-cover:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.album-photo-cover.active {
    opacity: 1;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
}

.album-photo-cover.active svg {
    color: #000;
}

.album-photo-cover.active:hover {
    background: linear-gradient(135deg, #ffc700 0%, #ffe34e 100%);
}

.community-menu-item-danger {
    color: #dc3545 !important;
}

.community-menu-item-danger:hover {
    background-color: rgba(220, 53, 69, 0.1) !important;
}

.community-menu-item-reported {
    color: #ffc107 !important;
}

.community-menu-item-reported:hover {
    background-color: rgba(255, 193, 7, 0.1) !important;
}

.community-menu-btn.has-report {
    color: #ffc107 !important;
}

/* ========== ПОДСВЕТКА КНОПОК ВЛОЖЕНИЙ ========== */

/* Базовые стили для всех кнопок вложений */
.attachment-btn,
.create-clip-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--post-border);
    background: var(--sidebar-bg);
}

.attachment-btn::before,
.create-clip-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.attachment-btn:hover::before,
.create-clip-btn:hover::before {
    left: 100%;
}

/* Кнопка Фото/Видео - зелёная подсветка */
#addPhotoVideo {
    border-color: rgba(46, 204, 113, 0.3);
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.08), rgba(39, 174, 96, 0.05));
}

#addPhotoVideo svg {
    color: #2ecc71;
    filter: drop-shadow(0 0 4px rgba(46, 204, 113, 0.4));
    transition: all 0.3s ease;
}

#addPhotoVideo:hover {
    border-color: rgba(46, 204, 113, 0.6);
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.15), rgba(39, 174, 96, 0.1));
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.2), 
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

#addPhotoVideo:hover svg {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(46, 204, 113, 0.6));
}

/* Кнопка Файлы - синяя подсветка */
#addFile {
    border-color: rgba(52, 152, 219, 0.3);
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.08), rgba(41, 128, 185, 0.05));
}

#addFile svg {
    color: #3498db;
    filter: drop-shadow(0 0 4px rgba(52, 152, 219, 0.4));
    transition: all 0.3s ease;
}

#addFile:hover {
    border-color: rgba(52, 152, 219, 0.6);
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.15), rgba(41, 128, 185, 0.1));
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

#addFile:hover svg {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(52, 152, 219, 0.6));
}

/* Кнопка Создать клип - градиентная подсветка */
.create-clip-btn {
    border-color: rgba(255, 107, 107, 0.3);
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(255, 142, 83, 0.08));
}

.create-clip-btn svg {
    color: #FF6B6B;
    filter: drop-shadow(0 0 4px rgba(255, 107, 107, 0.4));
    transition: all 0.3s ease;
}

.create-clip-btn:hover {
    border-color: rgba(255, 107, 107, 0.6);
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.18), rgba(255, 142, 83, 0.12));
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.25),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.create-clip-btn:hover svg {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 8px rgba(255, 107, 107, 0.6));
}

/* Анимация пульсации для привлечения внимания */
@keyframes subtleGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(var(--glow-color), 0.2);
    }
    50% {
        box-shadow: 0 0 15px rgba(var(--glow-color), 0.3);
    }
}

/* Активное состояние (когда выбраны файлы) */
.attachment-btn.has-files,
.create-clip-btn.has-files {
    animation: subtleGlow 2s ease-in-out infinite;
}

#addPhotoVideo.has-files {
    --glow-color: 46, 204, 113;
    border-color: #2ecc71;
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.2), rgba(39, 174, 96, 0.15));
}

#addFile.has-files {
    --glow-color: 52, 152, 219;
    border-color: #3498db;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.2), rgba(41, 128, 185, 0.15));
}

.create-clip-btn.has-files {
    --glow-color: 255, 107, 107;
    border-color: #FF6B6B;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.2), rgba(255, 142, 83, 0.15));
}

/* Текст кнопок */
.attachment-btn span,
.create-clip-btn span {
    font-weight: 500;
    transition: all 0.3s ease;
}

#addPhotoVideo:hover span {
    color: #2ecc71;
}

#addFile:hover span {
    color: #3498db;
}

.create-clip-btn:hover span {
    color: #FF6B6B;
}

/* Fix: body scroll lock для модалок */
body.modal-open {
    overflow: hidden;
}

/* Fix: dropdown menus — используем transform для позиционирования */
.post-dropdown-menu,
.clip-dropdown-menu,
.album-dropdown-menu {
    position: fixed;
    z-index: 1000005;
}

.community-dropdown-menu {
    position: absolute;
    z-index: 9000;
}

.community-action-menu-wrapper {
    position: relative;
}

/* ==========================================================================
   АДАПТИВНЫЙ ДИЗАЙН — ЕДИНЫЙ БЛОК
   Порядок: от большого к малому (desktop-first)
   Брейкпоинты: 1400+, 1200, 992, 768, 576, 375
   ========================================================================== */

/* ===== БОЛЬШИЕ ЭКРАНЫ (1400px+) ===== */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }

    .content-layout {
        grid-template-columns: 3fr 1fr;
        gap: 2rem;
    }

    .community-cover {
        height: 450px;
    }

    .community-avatar,
    .community-avatar-placeholder {
        width: 180px;
        height: 180px;
    }

    .community-name {
        font-size: 2.25rem;
    }
}

/* ===== НОУТБУКИ / МАЛЫЕ ДЕСКТОПЫ (до 1199px) ===== */
@media (max-width: 1199px) {
    .content-layout {
        grid-template-columns: 2fr 1fr;
        gap: 1.5rem;
    }

    .community-avatar,
    .community-avatar-placeholder {
        width: 140px;
        height: 140px;
    }

    .community-cover {
        height: 320px;
    }

    .gallery-item {
        width: 160px;
        height: 160px;
    }

    .gallery-album-item,
    .album-create-button {
        width: 160px;
        height: 160px;
    }

    .gallery-article-item,
    .article-create-button {
        width: 160px;
        height: 220px;
    }

    .gallery-item.clip-item {
        width: 140px;
        height: 249px;
    }

    .create-post-actions {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .post-attachments {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .post-options {
        gap: 0.75rem;
    }
}

/* ===== ПЛАНШЕТЫ (до 991px) ===== */
@media (max-width: 991px) {
    .content-layout {
        display: block;
    }

    .content-layout .community-sidebar {
        display: none;
    }

    .community-sidebar-wrapper {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        margin-bottom: 2rem;
        width: 100%;
    }

    .community-sidebar-wrapper .stories-section,
    .community-sidebar-wrapper .subscribers-widget {
        min-width: 0;
    }

    .container {
        max-width: 720px;
    }

    .community-avatar,
    .community-avatar-placeholder {
        width: 140px;
        height: 140px;
    }

    .community-cover {
        height: 300px;
    }

    .community-avatar-section {
        gap: 1rem;
    }

    .community-details {
        padding-top: 4.5rem;
    }

    .community-actions {
        padding-top: 5.5rem;
    }

    .gallery-item {
        width: 150px;
        height: 150px;
    }

    .gallery-album-item,
    .album-create-button {
        width: 150px;
        height: 150px;
    }

    .gallery-article-item,
    .article-create-button {
        width: 150px;
        height: 210px;
    }

    .create-post-card {
        padding: 1.25rem 1rem;
    }

    .post-create-options {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    /* Лайтбокс — планшеты */
    .lightbox-content {
        padding: 60px 20px 120px;
    }

    .lightbox-media-container {
        max-width: 90vw;
        max-height: 75vh;
    }

    .lightbox-image {
        max-height: 75vh;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
    }

    .lightbox-thumbnail {
        width: 50px;
        height: 50px;
    }

    /* Аудио в лайтбоксе */
    .lightbox-audio-container {
        min-width: auto;
        max-width: 95vw;
        width: 100%;
        padding: 1.5rem 1rem;
        gap: 1.5rem;
    }

    .lightbox-audio-container .audio-visualization {
        width: 100px;
        height: 100px;
    }

    /* Story modal — планшеты */
    .story-modal {
        padding: 0.75rem;
    }

    .story-modal-content {
        max-width: 540px;
        max-height: 90vh;
    }

    .story-preview-container {
        max-width: 280px;
    }

    .story-text-input {
        max-width: 100%;
        min-height: 80px;
        font-size: 0.875rem;
    }
}

/* ===== МОБИЛЬНЫЕ УСТРОЙСТВА (до 767px) ===== */
@media (max-width: 767px) {
    .container {
        padding: 0 0.75rem;
    }

    .community-page {
        min-height: calc(100vh - 60px);
    }

    /* ===== САЙДБАР ===== */
    .community-sidebar-wrapper {
        display: block;
    }

    .community-sidebar-wrapper .stories-section,
    .community-sidebar-wrapper .subscribers-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;
        margin-top: -3.5rem;
    }

    .community-avatar,
    .community-avatar-placeholder {
        width: 100px;
        height: 100px;
        border-width: 4px;
    }

    .community-avatar-placeholder {
        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-actions {
        padding-top: 0.5rem;
        margin: 0 auto;
        justify-content: center;
        flex-wrap: wrap;
    }

    .community-actions .btn {
        width: 100%;
    }

    .community-meta {
        justify-content: center;
        flex-wrap: wrap;
    }

    .community-stats {
        justify-content: center;
        gap: 2rem;
        flex-wrap: wrap;
    }

    /* ===== БЕЙДЖ ЗАЯВКИ ===== */
    .request-pending-badge {
        margin-left: 0;
        margin-top: 8px;
        width: 100%;
        justify-content: center;
    }

    /* ===== ГАЛЕРЕЯ ===== */
    .community-media-gallery {
        padding: 1rem;
    }

    .gallery-carousel {
        gap: 0.5rem;
    }

    .gallery-item {
        width: 120px;
        height: 120px;
    }

    .gallery-album-item,
    .album-create-button {
        width: 120px;
        height: 120px;
    }

    .gallery-article-item,
    .article-create-button {
        width: 130px;
        height: 180px;
    }

    .gallery-item.clip-item {
        width: 120px;
        height: 213px;
    }

    /* ===== СОЗДАНИЕ ПОСТА ===== */
    .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;
    }

    .post-option-item {
        padding: 0.5rem;
        font-size: 0.75rem;
        justify-content: center;
    }

    .post-option-item svg {
        width: 16px;
        height: 16px;
    }

    .post-option-panel {
        padding: 0.875rem;
    }

    .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.75rem;
    }

    .post-attachments {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        width: 100%;
    }

    .attachment-btn {
        flex: none;
        width: auto;
        justify-content: center;
        padding: 0.625rem 0.75rem;
        border-radius: 8px;
    }

    .create-clip-btn {
        flex: none;
        width: auto;
        justify-content: center;
        padding: 0.625rem 0.75rem;
        font-size: 0.8125rem;
        grid-column: unset;
    }

    .post-options {
        display: flex;
        flex-direction: row;
        width: 100%;
        gap: 0.75rem;
        align-items: center;
    }

    .visibility-dropdown {
        flex: 1;
        width: auto;
    }

    .visibility-button {
        width: 100%;
        padding: 0.625rem 0.875rem;
        font-size: 0.8125rem;
    }

    #publishPost {
        flex: none;
        width: auto;
        padding: 0.75rem 1.5rem;
        font-size: 0.9375rem;
    }

    /* Превью вложений */
    .attachments-preview {
        gap: 0.625rem;
    }

    .attachment-preview {
        width: calc(50% - 0.375rem);
        height: 110px;
    }

    .post-draft-preview-card {
        padding: 0.625rem;
    }

    .post-draft-preview-media {
        max-width: 100%;
    }

    /* ===== КАРТОЧКА ПОСТА ===== */
    .post-card {
        border-radius: 12px;
    }

    .post-content {
        padding: 0 1rem 0.75rem;
    }

    /* ===== КОММЕНТАРИИ ===== */
    .post-comments {
        padding: 0.75rem 1rem;
    }

    .comments-list {
        max-height: 300px;
    }

    .comment-replies {
        margin-left: 32px;
        margin-top: 0.5rem;
        padding-left: 0.5rem;
    }

    .comment-reply {
        padding-left: 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;
    }

    .comment-reply-input {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
        border-radius: 18px;
        min-height: 34px;
    }

    .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-submit {
        width: 34px;
        height: 34px;
    }

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

    /* Hover-элементы видимы на мобильных */
    .comment-actions {
        display: flex;
    }

    .album-photo-remove,
    .album-menu-btn,
    .article-menu-btn {
        opacity: 1;
    }

    /* ===== КЛИПЫ ===== */
    .post-clips .clip-container {
        max-width: 100%;
    }

    .clip-viewer-wrapper {
        max-width: 100%;
    }

    .clip-viewer.active.maximized .clip-viewer-wrapper,
    .clip-viewer.fullscreen .clip-viewer-wrapper {
        width: 100vw;
        width: 100dvw;
        max-width: 100%;
    }

    /* Header volume */
    .clips-header-volume {
        display: flex;
    }

    .clip-viewer .clip-volume-control,
    .clip-viewer .clip-control-btn[onclick*="toggleMute"] {
        display: none;
    }

    .clip-navigation {
        display: none !important;
    }

    /* ===== АУДИОПЛЕЕР В ПОСТАХ ===== */
    .audio-volume-control {
        display: none;
    }

    .audio-player-content {
        gap: 0.5rem;
    }

    .audio-play-btn {
        width: 32px;
        height: 32px;
    }

    .audio-play-btn svg {
        width: 16px;
        height: 16px;
    }

    .audio-time {
        font-size: 0.65rem;
        min-width: 26px;
    }

    /* ===== ЛАЙТБОКС ===== */
    .lightbox-content {
        padding: 50px 10px 100px;
    }

    .lightbox-media-container {
        max-width: 95vw;
        max-height: 70vh;
    }

    .lightbox-image {
        max-height: 70vh;
    }

    .lightbox-video {
        max-width: 95vw;
        max-height: 75vh;
    }

    .lightbox-header {
        padding: 0.75rem 1rem;
    }

    .lightbox-title {
        font-size: 1rem;
    }

    .lightbox-close {
        width: 36px;
        height: 36px;
    }

    .lightbox-nav {
        width: 36px;
        height: 36px;
    }

    .lightbox-prev {
        left: 0.5rem;
    }

    .lightbox-next {
        right: 0.5rem;
    }

    .lightbox-thumbnail {
        width: 44px;
        height: 44px;
    }

    .lightbox-thumbnails {
        gap: 0.375rem;
    }

    .lightbox-counter {
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
    }

    /* ===== АУДИО В ЛАЙТБОКСЕ ===== */
    .lightbox-audio-container {
        min-width: auto;
        max-width: 100%;
        width: calc(100vw - 2rem);
        padding: 1.5rem 1rem;
        gap: 1.25rem;
    }

    .lightbox-audio-container .audio-visualization {
        width: 80px;
        height: 80px;
    }

    .lightbox-audio-container .audio-play-btn {
        width: 40px;
        height: 40px;
    }

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

    .lightbox-audio-container .audio-time {
        font-size: 0.65rem;
        min-width: 26px;
    }

    .lightbox-audio-container .audio-progress-bar {
        height: 3px;
    }

    .lightbox-audio-container .audio-progress-handle {
        width: 10px;
        height: 10px;
    }

    .lightbox-audio-container .volume-btn {
        width: 28px;
        height: 28px;
    }

    .lightbox-audio-container .volume-slider-wrapper {
        width: 100px;
        height: 28px;
    }

    .lightbox-audio-container .volume-slider {
        width: 60px;
    }

    /* ===== STORY MODAL ===== */
    .story-modal {
        padding: 0;
        align-items: flex-end;
    }

    .story-modal-content {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 24px 24px 0 0;
        animation: slideUpMobile 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .story-modal-header {
        padding: 1rem 1.25rem;
        position: relative;
    }

    .story-modal-header::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 36px;
        height: 4px;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 2px;
    }

    .story-modal-header h3 {
        font-size: 0.9375rem;
        margin-top: 8px;
    }

    .modal-close {
        width: 30px;
        height: 30px;
        margin-top: 8px;
    }

    .story-modal-body {
        padding: 1.25rem;
        max-height: calc(95vh - 140px);
    }

    .story-upload-area {
        padding: 2rem 1.25rem;
    }

    .story-upload-area svg {
        width: 40px;
        height: 40px;
    }

    .story-preview-container {
        max-width: 100%;
        width: 100%;
    }

    .story-preview-wrapper {
        max-height: 400px;
        padding-bottom: 133.33%;
    }

    .story-text-input {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
        min-height: 90px;
        border-radius: 14px;
    }

    .story-options {
        gap: 0.5rem;
        padding: 0.875rem;
    }

    .story-modal-footer {
        padding: 1rem 1.25rem;
    }

    .story-modal-footer .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }

    .story-format-indicator {
        top: 0.75rem;
        right: 0.75rem;
        font-size: 0.6875rem;
    }

    .story-fit-toggle {
        bottom: 0.75rem;
        right: 0.75rem;
        font-size: 0.6875rem;
    }

    .story-orientation-warning {
        padding: 0.625rem 0.875rem;
    }

    .story-orientation-warning p {
        font-size: 0.75rem;
    }

    /* ===== РЕПОСТ МОДАЛКА ===== */
    .share-modal {
        margin: 20px auto;
        max-width: 95%;
        max-height: 100vh;
        display: flex;
        flex-direction: column;
    }

    .share-type-options {
        gap: 0.5rem;
    }

    .share-type-content {
        padding: 0.75rem;
    }

    .communities-scroll {
        max-height: 200px;
    }

    .community-option-avatar,
    .community-option-placeholder {
        width: 40px;
        height: 40px;
    }

    .form-group .form-control {
        min-height: 80px;
    }

    /* ===== МОДАЛКА ПОСТА ===== */
    .modal-dialog {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }

    /* ===== ЖАЛОБЫ ===== */
    .story-report-btn {
        width: 32px;
        height: 32px;
    }

    .story-comment-report-btn {
        font-size: 11px;
        padding: 3px 6px;
    }

    /* ===== МЕНЮ АЛЬБОМОВ ===== */
    .album-menu-btn {
        opacity: 1;
        width: 32px;
        height: 32px;
    }

    .album-dropdown-menu {
        min-width: 160px;
    }

    .album-menu-item {
        padding: 10px 14px;
        font-size: 14px;
    }

    /* ===== ТЕМЫ ===== */
    [data-theme="dark"] .story-modal {
        background: rgba(0, 0, 0, 0.98);
    }

    [data-theme="dark"] .story-modal-header::before {
        background: rgba(255, 255, 255, 0.4);
    }

    [data-theme="dark"] .story-upload-area {
        border-color: rgba(52, 152, 219, 0.4);
    }

    [data-theme="light"] .story-modal {
        background: rgba(255, 255, 255, 0.98);
    }

    [data-theme="light"] .story-modal-header::before {
        background: rgba(0, 0, 0, 0.2);
    }

    /* ===== АНИМАЦИЯ ЗАКРЫТИЯ ===== */
    .story-modal.closing .story-modal-content {
        animation: slideDownMobile 0.25s ease-out forwards;
    }
    
    .community-actions {
        order: 999;
        width: 100%;
    }

    .community-action-menu-wrapper {
        margin-left: auto;
    }
}

@keyframes slideUpMobile {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideDownMobile {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(100%); opacity: 0; }
}

/* ===== МАЛЫЕ МОБИЛЬНЫЕ (до 575px) ===== */
@media (max-width: 575px) {
    .container {
        padding: 0 0.5rem;
    }

    .community-private {
        margin: 2rem auto;
        padding: 2rem 1rem;
    }

    .community-cover {
        height: 170px;
    }

    .community-avatar,
    .community-avatar-placeholder {
        width: 80px;
        height: 80px;
    }

    .community-avatar-placeholder {
        font-size: 1.5rem;
    }

    .community-avatar-section {
        margin-top: -2.75rem;
    }

    .community-name {
        font-size: 1.25rem;
    }

    .community-username {
        font-size: 0.875rem;
    }

    .community-actions {
        flex-direction: column;
        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;
        flex-wrap: nowrap;
    }

    .gallery-item {
        width: 100px;
        height: 100px;
    }

    .gallery-album-item,
    .album-create-button {
        width: 100px;
        height: 100px;
    }

    .gallery-article-item,
    .article-create-button {
        width: 110px;
        height: 160px;
    }

    .gallery-item.clip-item {
        width: 100px;
        height: 178px;
    }

    /* Истории */
    .stories-container {
        gap: 0.375rem;
    }

    .story-avatar {
        width: 48px;
        height: 48px;
    }

    .story-username {
        font-size: 0.6875rem;
        max-width: 48px;
    }

    /* Подписчики */
    .subscriber-avatar,
    .subscriber-avatar-placeholder {
        width: 36px;
        height: 36px;
    }

    .subscriber-name {
        font-size: 0.8125rem;
    }

    /* Комментарии */
    .comment {
        padding: 0.5rem;
    }

    .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;
    }

    .comment-reply-input {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
        min-height: 30px;
        border-radius: 15px;
    }

    .comment-reply-submit {
        width: 30px;
        height: 30px;
    }

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

    .add-comment {
        gap: 0.375rem;
    }

    .comment-input {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
        min-height: 32px;
        border-radius: 16px;
    }

    .comment-submit {
        width: 32px;
        height: 32px;
    }

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

    .comment-action-btn {
        width: 28px;
        height: 28px;
    }

    /* Лайтбокс */
    .lightbox-content {
        padding: 44px 5px 90px;
    }

    .lightbox-media-container {
        max-width: 100vw;
        max-height: 65vh;
    }

    .lightbox-image {
        max-height: 65vh;
        border-radius: 4px;
    }

    .lightbox-video {
        max-width: 100vw;
        max-height: 70vh;
    }

    .lightbox-close {
        width: 32px;
        height: 32px;
    }

    .lightbox-nav {
        width: 32px;
        height: 32px;
    }

    .lightbox-thumbnail {
        width: 40px;
        height: 40px;
    }

    /* Аудио в лайтбоксе */
    .lightbox-audio-container {
        width: calc(100vw - 1.5rem);
        padding: 1.25rem 0.75rem;
        gap: 1rem;
    }

    .lightbox-audio-container .audio-visualization {
        width: 70px;
        height: 70px;
    }

    .lightbox-audio-container .audio-play-btn {
        width: 36px;
        height: 36px;
    }

    .lightbox-audio-container .audio-title {
        font-size: 0.75rem;
    }

    .lightbox-audio-container .audio-time {
        font-size: 0.625rem;
        min-width: 24px;
    }

    .lightbox-audio-container .volume-btn {
        width: 26px;
        height: 26px;
    }

    .lightbox-audio-container .volume-slider-wrapper {
        width: 85px;
    }

    .lightbox-audio-container .volume-slider {
        width: 50px;
    }

    /* Story modal */
    .story-modal-content {
        max-height: 98vh;
        border-radius: 20px 20px 0 0;
    }

    .story-modal-header {
        padding: 0.875rem 1rem;
    }

    .story-modal-header h3 {
        font-size: 0.875rem;
    }

    .modal-close {
        width: 28px;
        height: 28px;
    }

    .modal-close svg {
        width: 16px;
        height: 16px;
    }

    .story-modal-body {
        padding: 1rem;
        max-height: calc(98vh - 130px);
    }

    .story-upload-area {
        padding: 1.75rem 1rem;
        border-radius: 16px;
    }

    .story-upload-area svg {
        width: 36px;
        height: 36px;
    }

    .story-preview-wrapper {
        max-height: 350px;
        padding-bottom: 125%;
        border-radius: 14px;
    }

    .story-text-input {
        padding: 0.75rem 0.875rem;
        font-size: 0.8125rem;
        min-height: 80px;
    }

    .story-options {
        flex-direction: column;
        gap: 0.375rem;
    }

    .story-option-item {
        width: 100%;
        justify-content: center;
    }

    .story-modal-footer {
        padding: 0.875rem 1rem;
    }

    .story-modal-footer .btn {
        padding: 0.625rem 1rem;
        font-size: 0.8125rem;
    }

    .story-modal-footer .btn-secondary {
        flex: 0.8;
    }

    .story-modal-footer .btn-primary {
        flex: 1.2;
    }

    /* Репост модалка */
    .share-modal {
        margin: 10px auto;
        max-width: calc(100% - 20px);
    }

    .share-type-options {
        grid-template-columns: 1fr;
    }

    .communities-scroll {
        max-height: 180px;
    }

    .community-option-avatar,
    .community-option-placeholder {
        width: 36px;
        height: 36px;
    }

    .modal-footer {
        padding: 1rem;
        flex-direction: column-reverse;
    }

    .modal-footer .btn {
        width: 100%;
    }

    /* Клипы header volume */
    .clips-header-volume {
        padding: 6px 10px;
    }

    .clips-header-volume-btn {
        width: 28px;
        height: 28px;
    }

    .clips-header-volume-slider {
        width: 50px;
    }

    /* Модерация */
    .comment-moderate-actions {
        margin-left: 0.375rem;
        gap: 0.25rem;
    }

    .comment-moderate-approve,
    .comment-moderate-reject {
        width: 26px;
        height: 26px;
    }
}

/* ===== ОЧЕНЬ МАЛЫЕ ЭКРАНЫ (до 374px) ===== */
@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;
    }

    .post-attachments {
        grid-template-columns: 1fr;
    }

    .create-clip-btn {
        grid-column: span 1;
    }

    .attachment-preview {
        width: 100%;
        height: 100px;
    }

    /* Галерея */
    .gallery-item {
        width: 90px;
        height: 90px;
    }

    .gallery-album-item,
    .album-create-button {
        width: 90px;
        height: 90px;
    }

    .gallery-article-item,
    .article-create-button {
        width: 100px;
        height: 140px;
    }

    .gallery-item.clip-item {
        width: 85px;
        height: 151px;
    }

    .story-avatar {
        width: 42px;
        height: 42px;
    }

    .story-username {
        max-width: 42px;
    }

    /* Комментарии */
    .post-comments {
        padding: 0.375rem 0.5rem 0.5rem;
    }

    .comment {
        padding: 0.375rem 0.125rem;
    }

    .comment-avatar,
    .comment-avatar-placeholder {
        width: 26px;
        height: 26px;
    }

    .comment-author {
        font-size: 0.7rem;
    }

    .comment-text {
        font-size: 0.7rem;
    }

    .comment-replies {
        margin-left: 20px;
    }

    .comment-replies .comment-replies {
        margin-left: 16px;
    }

    .comment-reply-input {
        font-size: 0.7rem;
        padding: 0.375rem 0.5rem;
    }

    .comment-input {
        font-size: 0.7rem;
        padding: 0.375rem 0.625rem;
    }

    /* Story modal */
    .story-modal-header {
        padding: 0.75rem 0.875rem;
    }

    .story-modal-header::before {
        width: 32px;
        height: 3px;
        top: 6px;
    }

    .story-modal-header h3 {
        font-size: 0.8125rem;
    }

    .modal-close {
        width: 26px;
        height: 26px;
    }

    .modal-close svg {
        width: 14px;
        height: 14px;
    }

    .story-modal-body {
        padding: 0.875rem;
    }

    .story-upload-area {
        padding: 1.5rem 0.875rem;
    }

    .story-upload-area svg {
        width: 32px;
        height: 32px;
    }

    .story-preview-wrapper {
        max-height: 320px;
        padding-bottom: 120%;
    }

    .story-text-input {
        padding: 0.625rem 0.75rem;
        font-size: 0.75rem;
        min-height: 70px;
    }

    .story-modal-footer .btn {
        padding: 0.5625rem 0.875rem;
        font-size: 0.75rem;
    }

    /* Лайтбокс аудио */
    .lightbox-audio-container {
        width: calc(100vw - 1rem);
        padding: 1rem 0.5rem;
    }

    .lightbox-audio-container .audio-visualization {
        width: 60px;
        height: 60px;
    }

    .lightbox-audio-container .audio-play-btn {
        width: 32px;
        height: 32px;
    }

    .lightbox-audio-container .audio-title {
        font-size: 0.7rem;
    }

    .lightbox-audio-container .audio-time {
        font-size: 0.6rem;
    }

    .lightbox-audio-container .volume-btn {
        width: 24px;
        height: 24px;
    }

    .lightbox-audio-container .volume-slider {
        width: 45px;
    }

    /* Clips volume */
    .clips-header-volume {
        padding: 5px 8px;
    }

    .clips-header-volume-slider {
        width: 40px;
    }
}

/* ===== ЛАНДШАФТНАЯ ОРИЕНТАЦИЯ МОБИЛЬНЫХ ===== */
