/* Страница отдельного поста */
.post-page {
    min-height: calc(100vh - 72px);
    background: var(--body-bg);
    padding: 2rem 0 3rem;
}

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

.post-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    align-items: start;
}

/* Контейнер основного поста */
.post-content-wrapper {
    border-radius: 16px;
    border: 1px solid var(--post-border);
    overflow: hidden;
}

/* Боковая панель */
.post-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 {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--post-border);
}

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

/* Карточка сообщества в сайдбаре */
.community-sidebar-card {
    padding: 1.5rem;
    text-align: center;
}

.community-sidebar-avatar {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    margin: 0 auto 1rem;
    display: block;
}

.community-sidebar-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-color), var(--button-primary-bg));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    margin: 0 auto 1rem;
}

.community-sidebar-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.community-sidebar-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    justify-content: center;
}

.community-sidebar-name:hover {
    color: var(--accent-color);
}

.community-sidebar-name .verified-badge {
    color: #1DA1F2;
}

.community-sidebar-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.community-sidebar-description {
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.5;
    margin: 0;
}

/* Карточка автора в сайдбаре */
.author-sidebar-card {
    padding: 1.5rem;
    text-align: center;
}

.author-sidebar-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    display: block;
}

.author-sidebar-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), var(--button-primary-bg));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    margin: 0 auto 1rem;
}

.author-sidebar-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.author-sidebar-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    justify-content: center;
}

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

.author-sidebar-name .verified-badge {
    color: #1DA1F2;
}

.author-sidebar-username {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.author-sidebar-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1rem 0;
    border-top: 1px solid var(--post-border);
    border-bottom: 1px solid var(--post-border);
}

.author-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.author-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.author-stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Похожие посты */
.related-posts-list {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.related-post-item {
    display: flex;
    gap: 0.875rem;
    padding: 0.875rem;
    border-radius: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    background: transparent;
    border: 1px solid transparent;
}

.related-post-item:hover {
    background: var(--sidebar-bg);
    border-color: var(--post-border);
    transform: translateX(2px);
}

.related-post-image {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--sidebar-bg);
    border: 1px solid var(--post-border);
}

.related-post-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0.125rem 0;
}

.related-post-header {
    margin-bottom: 0.375rem;
}

.related-post-author {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    line-height: 1.2;
}

.related-post-author .verified-badge {
    width: 13px;
    height: 13px;
    color: #1DA1F2;
    flex-shrink: 0;
}

.related-post-text {
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    margin-bottom: 0.5rem;
}

.related-post-meta {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding-top: 0.25rem;
}

.related-post-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    white-space: nowrap;
    line-height: 1;
    padding: 0.125rem 0;
}

.related-post-stat svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    display: block;
}

.related-post-stat span {
    display: inline-block;
    line-height: 1;
    padding-top: 1px;
}

/* Загрузка похожих постов */
.related-posts-loading {
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: var(--text-secondary);
}

.related-posts-loading .spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--post-border);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

.no-related-posts {
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Стили для постов внутри страницы */
.post-content-wrapper .post-card {
    border: none;
    border-radius: 0;
}

.post-content-wrapper .post-card:hover {
    box-shadow: none;
}

/* Улучшенное отображение комментариев */
.post-content-wrapper .comments-list {
    max-height: none;
    padding-right: 0;
}

/* Увеличенная область комментариев */
.post-content-wrapper .comment {
    padding: 1rem;
}

.post-content-wrapper .comment-avatar,
.post-content-wrapper .comment-avatar-placeholder {
    width: 40px;
    height: 40px;
}

.post-content-wrapper .comment-text {
    font-size: 0.9375rem;
}

/* Загрузка похожих постов */
.related-posts-loading {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.related-posts-loading .spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--text-secondary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 0.75rem;
}

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

.no-related-posts {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ========== ВСЕ СТИЛИ ДЛЯ ПОСТОВ ИЗ POSTS.CSS ========== */

/* Контейнер постов */
.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);
}

.shared-post-deleted {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--sidebar-bg);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    gap: 0.75rem;
}

.shared-post-deleted svg {
    width: 24px;
    height: 24px;
    color: var(--error-color);
}

/* Опрос в посте */
.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(.show-results) {
    background: var(--post-bg);
    border-color: var(--accent-color);
}

.poll-option.show-results {
    cursor: default;
}

.poll-option.my-vote {
    border-color: var(--accent-color);
    background: rgba(52, 152, 219, 0.05);
}

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

/* Медиа в постах */
.post-media {
    margin: 0.75rem 0;
    display: grid;
    gap: 0.5rem;
    border-radius: 12px;
    overflow: hidden;
}

.media-item {
    position: relative;
    background: #000;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

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

.media-item video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    background: #000;
}

/* Специальные стили для одиночного медиа */
.post-media.media-1 {
    grid-template-columns: 1fr;
    max-height: 500px;
    min-height: 280px;
}

.post-media.media-1 .media-item {
    height: 100%;
    max-height: 500px;
    min-height: 280px;
}

.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-3 .media-item:first-child {
    grid-row: span 2;
    height: 400px;
}

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

.more-media-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.more-media-overlay span {
    color: white;
    font-size: 1.75rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 2;
    position: relative;
}

.media-item.more-media::after {
    display: none;
}

.media-item.more-media {
    position: relative;
    cursor: pointer;
}

/* Файлы в постах */
.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"]):not(.disabled) {
    background-color: rgba(0, 0, 0, 0.05);
}

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

.post-interaction-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.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;
    cursor: pointer;
}

.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;
    cursor: pointer;
}

.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;
    cursor: pointer;
}

.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-replies {
    margin-left: 48px;
    margin-top: 0.75rem;
}

.comment-reply {
    position: relative;
    padding-left: 1rem;
}

.comment-footer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.375rem;
}

.comment-reply-btn,
.comment-edit-btn,
.comment-delete-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.comment-reply-btn:hover {
    background: var(--sidebar-bg);
    color: var(--accent-color);
}

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

.comment-delete-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
}

.comment-reply-disabled {
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: not-allowed;
    opacity: 0.5;
    padding: 0.25rem 0.5rem;
}

/* Поле ввода ответа */
.comment-reply-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: var(--sidebar-bg);
    border-radius: 8px;
}

.comment-reply-input {
    flex: 1;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    outline: none;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

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

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

.comment-reply-submit:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

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

.comment-replies .comment-replies .comment-reply-btn {
    display: none;
}

/* Кнопка показать больше комментариев */
.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;
}

/* Соавторы */
.post-coauthors {
    display: inline-flex;
    align-items: center;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-top: 0.125rem;
}

.coauthors-label {
    margin-right: 0.25rem;
}

.coauthor-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.coauthor-link:hover {
    text-decoration: underline;
    color: var(--button-primary-bg);
}

.coauthor-link:not(:last-child)::after {
    content: ',';
    margin-right: 0.25rem;
    color: var(--text-secondary);
}

/* Модерация */
.moderation-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 12px;
    font-size: 12px;
    color: rgb(251, 191, 36);
    margin-top: 4px;
}

.moderation-badge svg {
    width: 14px;
    height: 14px;
}

.comment-moderation-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 8px;
    font-size: 11px;
    color: rgb(251, 191, 36);
    margin-left: 8px;
}

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

.comment-pending {
    opacity: 0.8;
    background: rgba(251, 191, 36, 0.03);
}

.comment-moderate-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 0.5rem;
}

.comment-moderate-approve,
.comment-moderate-reject {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.comment-moderate-approve {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.comment-moderate-approve:hover {
    background: rgba(34, 197, 94, 0.2);
    transform: scale(1.1);
}

.comment-moderate-reject {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
}

.comment-moderate-reject:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: scale(1.1);
}

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

/* ========== СОВРЕМЕННЫЙ АУДИОПЛЕЕР ========== */
.post-audio-files {
    margin: 0.75rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.modern-audio-player {
    background: var(--sidebar-bg);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.modern-audio-player:hover {
    background: var(--input-bg);
}

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

/* Кнопка Play/Pause */
.audio-play-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), var(--button-primary-bg));
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.audio-play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

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

.audio-play-btn .play-icon {
    margin-left: 2px;
}

/* Основная секция плеера */
.audio-main-section {
    flex: 1;
    min-width: 0;
}

/* Название трека */
.audio-title {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Контролы */
.audio-controls {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

/* Таймкоды */
.audio-time {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    min-width: 32px;
    user-select: none;
}
