.posts-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.post-card {
    background: var(--post-bg);
    border: 1px solid var(--post-border);
    border-radius: 16px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

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

.post-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
}

.post-author-avatar-wrapper {
    flex-shrink: 0;
    text-decoration: none;
}

.post-author-avatar,
.post-author-placeholder {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    flex-shrink: 0;
}

.post-author-avatar {
    display: block;
    object-fit: cover;
}

.post-author-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-color), var(--button-primary-bg));
    color: var(--button-primary-text);
    font-size: 0.875rem;
    font-weight: 600;
}

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

.post-author-name {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
}

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

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

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

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

.post-menu {
    position: relative;
    flex-shrink: 0;
}

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

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

.post-menu-btn.active,
.post-menu-btn.has-report {
    color: var(--accent-color);
}

.post-dropdown-menu {
    position: fixed;
    min-width: 200px;
    overflow: hidden;
    z-index: 1000;
    background: var(--post-bg);
    border: 1px solid var(--post-border);
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

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

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

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

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

.post-menu-item-reported {
    color: var(--accent-color);
}

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

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

.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,
.repost-comment-text {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--post-border);
}

.shared-post-container {
    overflow: hidden;
    background: var(--sidebar-bg);
    border: 1px solid var(--post-border);
    border-radius: 12px;
}

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

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

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

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

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

.shared-post-deleted,
.post-moderation-notice {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    color: var(--text-secondary);
}

.post-poll {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--sidebar-bg);
    border-radius: 12px;
}

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

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

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

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

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

.poll-option-text,
.poll-percentage {
    position: relative;
    z-index: 2;
}

.poll-option-text {
    max-width: 100%;
    color: var(--text-primary);
    overflow-wrap: anywhere;
}

.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;
    inset: 0 auto 0 0;
    background: rgba(52, 152, 219, 0.2);
    border-radius: 8px;
    transition: width 0.3s ease;
}

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

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

.post-media {
    display: grid;
    gap: 0.5rem;
    overflow: hidden;
    margin: 0.75rem 0;
    border-radius: 12px;
}

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

.media-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    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;
    display: block;
    object-fit: contain;
    background: #000;
}

.post-media.media-1 {
    grid-template-columns: 1fr;
    min-height: 280px;
    max-height: 500px;
}

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

.post-media.media-1.single-vertical-image,
.post-media.media-1.single-vertical-video {
    height: clamp(320px, 78vh, 960px);
    min-height: clamp(320px, 78vh, 960px);
    max-height: clamp(320px, 78vh, 960px);
}

.post-media.media-1.single-vertical-image .media-item,
.post-media.media-1.single-vertical-video .media-item {
    height: 100%;
    min-height: 100%;
    max-height: none;
}

.media-item.vertical-image img,
.post-media.media-1.single-vertical-image .media-item img,
.post-media.media-1.single-vertical-video .media-item video {
    object-fit: contain;
    background: #000;
}

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

.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;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    color: white;
    font-size: 2rem;
    font-weight: 700;
}

.post-files,
.post-audio-files {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0.75rem 0;
}

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

.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;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent-color), var(--button-primary-bg));
    border-radius: 8px;
    color: var(--button-primary-text);
}

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

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

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

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

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

.audio-player-content,
.audio-controls,
.audio-volume-control {
    display: flex;
    align-items: center;
}

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

.audio-main-section {
    min-width: 0;
    flex: 1;
}

.audio-title {
    max-width: 100%;
    overflow: hidden;
    margin-bottom: 0.375rem;
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.audio-play-btn,
.volume-btn {
    border: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.audio-play-btn {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent-color), var(--button-primary-bg));
    color: white;
}

.audio-controls {
    gap: 0.625rem;
}

.audio-time {
    min-width: 32px;
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-variant-numeric: tabular-nums;
}

.audio-progress-container {
    height: 24px;
    display: flex;
    align-items: center;
    flex: 1;
    padding: 0 4px;
    cursor: pointer;
}

.audio-progress-bar {
    position: relative;
    width: 100%;
    height: 4px;
    background: var(--post-border);
    border-radius: 2px;
}

.audio-buffer-bar,
.audio-progress-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0%;
    border-radius: 2px;
}

.audio-buffer-bar {
    background: rgba(52, 152, 219, 0.1);
}

.audio-progress-fill {
    background: var(--accent-color);
}

.audio-progress-handle {
    position: absolute;
    top: 50%;
    left: 0%;
    width: 12px;
    height: 12px;
    transform: translate(-50%, -50%);
    background: var(--accent-color);
    border: 2px solid var(--post-bg);
    border-radius: 50%;
}

.audio-volume-control {
    position: relative;
    margin-left: 0.5rem;
}

.volume-btn {
    width: 32px;
    height: 32px;
    background: var(--sidebar-bg);
    border: 1px solid var(--post-border);
    color: var(--text-secondary);
}

.volume-slider-wrapper {
    position: absolute;
    top: 50%;
    right: 100%;
    width: 140px;
    height: 32px;
    display: flex;
    align-items: center;
    padding-right: 8px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%);
    transition: opacity 0.2s ease;
}

.audio-volume-control:hover .volume-slider-wrapper {
    opacity: 1;
    pointer-events: all;
}

.volume-slider-container {
    width: calc(100% - 8px);
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 12px;
    background: var(--post-bg);
    border: 1px solid var(--post-border);
    border-radius: 16px;
}

.volume-slider {
    width: 80px;
    height: 4px;
    appearance: none;
    background: var(--post-border);
    border-radius: 2px;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    width: 12px;
    height: 12px;
    appearance: none;
    background: var(--accent-color);
    border: 2px solid var(--post-bg);
    border-radius: 50%;
}

.post-interaction-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 1.25rem;
    background: var(--sidebar-bg);
    border-top: 1px solid var(--post-border);
}

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

.post-interaction-item,
.post-views {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-interaction-item {
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

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

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

.interaction-like,
.interaction-like.active {
    color: #e74c3c;
}

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

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

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

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

.post-comments {
    padding: 0.75rem 1.25rem 1rem;
    background: var(--sidebar-bg);
}

.post-comments.public-comments {
    padding-bottom: 1.25rem;
}

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

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

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

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

.comment-avatar-wrapper {
    display: block;
    flex-shrink: 0;
    border-radius: 50%;
    text-decoration: none;
}

.comment-avatar,
.comment-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}

.comment-avatar {
    object-fit: cover;
}

.comment-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-color), var(--button-primary-bg));
    color: var(--button-primary-text);
    font-size: 0.75rem;
    font-weight: 600;
}

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

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

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

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

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

.comment-text {
    color: var(--text-primary);
    font-size: 0.875rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.comment-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.375rem;
}

.comment-action,
.comment-report-btn,
.show-more-comments {
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.8125rem;
}

.comment-action:hover,
.comment-report-btn:hover,
.show-more-comments:hover {
    color: var(--accent-color);
}

.comment-report-btn.reported {
    color: var(--accent-color);
}

.add-comment {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

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

.comment-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: var(--post-bg);
    border: 1px solid var(--post-border);
    border-radius: 20px;
    color: var(--text-primary);
    outline: none;
}

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

.comment-submit {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--accent-color);
    border: 0;
    border-radius: 50%;
    color: white;
    cursor: pointer;
}

.login-to-comment {
    display: flex;
    justify-content: center;
    padding-top: 0.5rem;
}

.no-posts {
    padding: 3rem 1.5rem;
    background: var(--post-bg);
    border: 1px solid var(--post-border);
    border-radius: 16px;
    color: var(--text-secondary);
    text-align: center;
}

.no-posts h3 {
    margin: 1rem 0 0.5rem;
    color: var(--text-primary);
}

.post-clips {
    position: relative;
    display: flex;
    justify-content: center;
    overflow: visible;
    margin: 0.75rem 0;
    background: transparent;
    border-radius: 0;
}

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

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

.post-clips .clip-play-overlay,
.clip-viewer .clip-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    z-index: 12;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

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

.post-clips .clip-play-overlay:hover,
.clip-viewer .clip-play-overlay:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background: rgba(52, 152, 219, 0.75);
}

.post-clips .clip-play-overlay svg,
.clip-viewer .clip-play-overlay svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    fill: white;
}

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

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

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

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

.post-clips .clip-action-btn.disabled,
.post-clips .clip-action-btn[aria-disabled="true"],
.post-clips .clip-action-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.post-clips .clip-action-btn.disabled:hover,
.post-clips .clip-action-btn[aria-disabled="true"]:hover,
.post-clips .clip-action-btn:disabled:hover {
    transform: none;
}

.post-clips .clip-action-btn.liked,
.clip-viewer .clip-action-btn.liked {
    color: #FF0050;
    border-color: #FF0050;
    background: rgba(255, 0, 80, 0.22);
}

.post-clips .clip-action-btn svg,
.clip-viewer .clip-action-btn svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    stroke-width: 2;
}

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

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

.post-clips .clip-controls,
.clip-viewer .clip-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 14;
    padding: 12px 16px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82), transparent);
    pointer-events: auto;
}

.post-clips .clip-controls {
    opacity: 0;
    transition: opacity 0.25s ease;
}

.post-clips .clip-container:hover .clip-controls,
.post-clips .clip-container.show-controls .clip-controls {
    opacity: 1;
}

.clip-viewer .clip-controls {
    opacity: 0;
    transition: opacity 0.25s ease;
}

.clip-player-container:hover .clip-controls,
.clip-player-container.show-controls .clip-controls {
    opacity: 1;
}

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

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

.clip-viewer .clip-progress-handle {
    position: absolute;
    top: 50%;
    left: 0%;
    width: 12px;
    height: 12px;
    transform: translate(-50%, -50%);
    background: #FF0050;
    border: 2px solid white;
    border-radius: 50%;
}

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

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

.post-clips .clip-control-buttons,
.clip-viewer .clip-control-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-clips .clip-control-btn,
.clip-viewer .clip-control-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    color: white;
    cursor: pointer;
}

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

.post-clips .clip-volume-control {
    position: absolute;
    right: 12px;
    bottom: 30px;
    z-index: 15;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.72);
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.post-clips .clip-container:hover .clip-volume-control {
    opacity: 1;
}

.post-clips .volume-slider,
.clip-viewer .volume-slider {
    width: 80px;
    height: 4px;
    appearance: none;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    outline: none;
}

.post-clips .volume-slider::-webkit-slider-thumb,
.clip-viewer .volume-slider::-webkit-slider-thumb {
    width: 12px;
    height: 12px;
    appearance: none;
    background: white;
    border-radius: 50%;
}

.clip-viewer {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    background: #000;
}

.clip-viewer.active {
    display: block;
}

.clip-viewer-container,
.clip-player-container {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.clip-viewer-wrapper {
    position: relative;
    width: 100%;
    max-width: 450px;
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    margin: 0 auto;
    background: #000;
}

.clip-viewer .clip-video {
    position: absolute;
    inset: 0;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: none;
    background: #000;
}

.clip-viewer-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 20px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), transparent);
}

.clip-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.clip-header-title {
    flex: 1;
    color: white;
    font-size: 18px;
    font-weight: 600;
}

.clips-header-volume {
    display: none;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    backdrop-filter: blur(20px);
}

.clips-header-volume-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.clips-header-volume-btn:active {
    transform: scale(0.9);
}

.clips-header-volume-slider {
    width: 60px;
    height: 4px;
    appearance: none;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    cursor: pointer;
    outline: none;
}

.clips-header-volume-slider::-webkit-slider-thumb {
    width: 12px;
    height: 12px;
    appearance: none;
    background: white;
    border-radius: 50%;
    cursor: pointer;
}

.clips-header-volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: white;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.header-volume-icon {
    flex-shrink: 0;
}

.clip-close-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    cursor: pointer;
}

.clip-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.clip-viewer .clip-info {
    position: absolute;
    left: 16px;
    right: 70px;
    bottom: 80px;
    z-index: 10;
    color: white;
    pointer-events: auto;
}

.clip-viewer .clip-actions {
    position: absolute;
    right: 12px;
    bottom: 80px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    pointer-events: auto;
}

.clip-viewer.active.maximized .clip-viewer-wrapper,
.clip-viewer.fullscreen .clip-viewer-wrapper {
    width: min(100vw, 450px);
    width: min(100dvw, 450px);
    max-width: 450px;
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    margin: 0 auto;
    overflow: hidden;
}

.clip-viewer.active.maximized .clip-player-container,
.clip-viewer.fullscreen .clip-player-container {
    overflow: hidden;
}

.clip-viewer .clip-player-container.show-controls .clip-info {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 80px);
}

.clip-viewer .clip-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    min-width: 0;
}

.clip-viewer .clip-author-avatar-wrapper {
    flex-shrink: 0;
    display: block;
}

.clip-viewer .clip-author-avatar,
.clip-viewer .clip-author-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
    cursor: pointer;
}

.clip-viewer .clip-author-avatar {
    object-fit: cover;
}

.clip-viewer .clip-author-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: 16px;
    font-weight: 700;
}

.clip-viewer .clip-author-details {
    flex: 1;
    min-width: 0;
}

.clip-viewer .clip-author-name {
    display: block;
    max-width: 100%;
    margin-bottom: 2px;
    color: white !important;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.clip-viewer .clip-author-username {
    display: block;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    line-height: 1.25;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.clip-viewer .clip-follow-btn {
    appearance: none;
    flex-shrink: 0;
    min-height: 34px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #FF0050, #FF4500);
    color: white;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 0, 80, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.clip-viewer .clip-follow-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 0, 80, 0.38);
}

.clip-viewer .clip-follow-btn.following,
.clip-viewer .clip-follow-btn.pending {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: none;
}

.clip-viewer .clip-description {
    max-height: 80px;
    margin-bottom: 12px;
    color: white;
    font-size: 14px;
    line-height: 1.45;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
    overflow: hidden;
    word-break: break-word;
}

.clip-viewer .clip-description.expanded {
    max-height: none;
}

.clip-viewer .clip-description-more {
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.clip-navigation {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

.clip-nav-btn {
    width: 44px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    color: white;
    cursor: pointer;
    pointer-events: auto;
}

.clip-nav-btn:hover {
    background: rgba(52, 152, 219, 0.4);
    border-color: rgba(52, 152, 219, 0.6);
    transform: scale(1.08);
}

.clip-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.clip-nav-btn svg {
    width: 20px;
    height: 20px;
}

.clip-comments-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    height: 70%;
    max-height: calc(100% - 60px);
    display: flex;
    flex-direction: column;
    background: rgba(20, 20, 20, 0.98);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    backdrop-filter: blur(20px);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.clip-comments-panel.show {
    transform: translateY(0);
}

.clip-comments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.clip-comments-header h3 {
    margin: 0;
    color: white;
    font-size: 18px;
    font-weight: 600;
}

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

.clip-comments-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.clip-comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

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

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

.clip-comments-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.clip-comment {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    animation: clipCommentSlideIn 0.3s ease;
}

@keyframes clipCommentSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.clip-comment-avatar,
.clip-comment-avatar-placeholder {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 50%;
    cursor: pointer;
}

.clip-comment-avatar {
    object-fit: cover;
}

.clip-comment-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: 14px;
    font-weight: 600;
}

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

.clip-comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.clip-comment-author {
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.clip-comment-author:hover {
    text-decoration: underline;
}

.clip-comment-time {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

.clip-comment-text {
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.clip-comment-actions {
    display: flex;
    gap: 16px;
}

.clip-comment-action {
    padding: 0;
    background: transparent;
    border: 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.clip-comment-action:hover {
    color: white;
}

.clip-comment-replies {
    margin-top: 12px;
    margin-left: 48px;
}

.clip-comment-reply {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

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

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

.clip-reply-input-wrapper,
.clip-comment-input-wrapper {
    display: flex;
    align-items: center;
}

.clip-reply-input-wrapper {
    gap: 8px;
    margin: 8px 0 12px 48px;
}

.clip-comment-input-wrapper {
    gap: 10px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.clip-reply-input,
.clip-comment-input {
    flex: 1;
    min-width: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    outline: none;
}

.clip-reply-input {
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 13px;
}

.clip-comment-input {
    border-radius: 24px;
    padding: 10px 20px;
    font-size: 14px;
}

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

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

.clip-reply-submit,
.clip-comment-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 0;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.clip-reply-submit {
    width: 32px;
    height: 32px;
    background: #FF0050;
}

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

.clip-comment-submit {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    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;
}

.clip-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    transform: translate(-50%, -50%);
}

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

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

.post-upload-progress {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    margin-top: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.post-upload-progress-track {
    width: 100%;
    height: 6px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
}

.post-upload-progress-fill {
    width: 8%;
    height: 100%;
    background: linear-gradient(135deg, #ff0050, #ff4500);
    border-radius: inherit;
    transition: width 0.2s ease;
}

.post-upload-progress-label {
    color: var(--text-secondary, rgba(255, 255, 255, 0.72));
    font-size: 13px;
    font-weight: 600;
}

.attachment-preview.is-uploading {
    position: relative;
    pointer-events: none;
}

.attachment-upload-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.62);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    backdrop-filter: blur(3px);
}

.attachment-upload-spinner {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: clipLoaderSpin 0.8s linear infinite;
}

.btn.is-uploading,
#publishPost.is-uploading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.clip-dropdown-menu-fullscreen {
    position: fixed;
    z-index: 1000004;
}

.clip-shared-info {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
}

.clip-shared-info svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.media-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

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

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

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

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

.lightbox-image,
.lightbox-video {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    background: black;
}

.lightbox-close,
.lightbox-nav,
.lightbox-action {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 0;
    border-radius: 50%;
    color: white;
    cursor: pointer;
}

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

.lightbox-nav {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 48px;
    z-index: 5;
    transform: translateY(-50%);
}

.lightbox-prev {
    left: 1rem;
}

.lightbox-next {
    right: 1rem;
}

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

.lightbox-thumbnails {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    max-width: 100%;
    overflow-x: auto;
    padding: 0.5rem;
}

.lightbox-thumbnail {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.65;
}

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

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

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

/* Canonical shared post states used by feed, profile, community and single post pages. */
.post-author-avatar {
    cursor: pointer;
    transition: transform 0.2s ease;
}

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

.post-author-name {
    display: block;
    margin-bottom: 0.125rem;
}

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

.poll-option-text {
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    padding-right: 0.5rem;
}

.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;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 0.75rem 0;
}

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

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

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

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

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

.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-text {
    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-footer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.375rem;
}

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

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

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

.show-more-comments {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50%;
    max-width: 300px;
    margin: 0 auto 0.75rem;
    padding: 0.625rem;
    background: var(--post-bg);
    border: 1px solid var(--post-border);
    border-radius: 8px;
    color: var(--accent-color);
    font-weight: 500;
}

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

.add-comment {
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--post-border);
}

.comment-input {
    padding: 0.625rem 1rem;
    background: var(--input-bg);
    font-size: 0.875rem;
    transition: background 0.2s ease, border-color 0.2s ease;
}

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

.comment-submit {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: var(--button-primary-text);
    transition: transform 0.2s ease, box-shadow 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;
}

.comment-replies {
    margin-top: 0.75rem;
    margin-left: 48px;
}

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

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

.comment-replies .comment-replies .comment-replies .comment-replies {
    margin-left: 0;
}

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

.comment-reply-btn,
.comment-edit-btn,
.comment-delete-btn,
.comment-reply-disabled {
    padding: 0.25rem 0.5rem;
    background: none;
    border: 0;
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
}

.comment-reply-btn,
.comment-edit-btn,
.comment-delete-btn {
    cursor: pointer;
    transition: background 0.2s ease, color 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 {
    opacity: 0.6;
    cursor: default;
}

.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;
    padding: 0.5rem 1rem;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 0.8125rem;
    outline: none;
    transition: background 0.2s ease, border-color 0.2s ease;
}

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

.comment-reply-submit {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border: 0;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 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 .comment-reply-btn {
    display: none;
}

.comment-moderation-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.375rem;
    background: rgba(243, 156, 18, 0.12);
    border-radius: 999px;
    color: var(--warning-color, #f39c12);
    font-size: 0.6875rem;
    font-weight: 600;
}

.comment-moderation-badge svg {
    flex-shrink: 0;
}

.comment-pending {
    opacity: 0.85;
}

.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;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    color: white;
    cursor: pointer;
}

.comment-moderate-approve {
    background: #2ecc71;
}

.comment-moderate-reject {
    background: #e74c3c;
}

.comment-moderate-approve:hover,
.comment-moderate-reject:hover {
    transform: translateY(-1px);
}

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

.comment-report-btn {
    padding: 4px 8px;
    background: transparent;
    border: 0;
    border-radius: 4px;
    color: var(--error-color);
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.comment-report-btn:hover {
    background: rgba(231, 76, 60, 0.1);
    color: var(--error-color);
    text-decoration: underline;
}

.comment-report-btn.reported {
    color: var(--warning-color, #f39c12);
}

.comment-report-btn.reported:hover {
    background: rgba(243, 156, 18, 0.1);
}

.post-menu-btn.has-report,
.clip-menu-btn.has-report,
.post-clip-menu-btn.has-report {
    color: var(--warning-color, #f39c12);
}

.clip-dropdown-menu {
    position: fixed;
    z-index: 1000005;
    min-width: 180px;
    max-width: calc(100vw - 16px);
    padding: 8px 0;
    background: var(--post-bg);
    border: 1px solid var(--post-border);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

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

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

.clip-menu-item svg {
    flex-shrink: 0;
}

.clip-menu-item-danger,
.post-menu-item-danger {
    color: var(--error-color, #e74c3c) !important;
}

.clip-menu-item-danger svg,
.post-menu-item-danger svg {
    color: var(--error-color, #e74c3c) !important;
}

.clip-menu-item-danger:hover,
.post-menu-item-danger:hover {
    background: rgba(231, 76, 60, 0.1) !important;
}

.clip-menu-item-warning,
.clip-menu-item-reported,
.post-menu-item-reported {
    color: var(--warning-color, #f39c12) !important;
}

.clip-menu-item-warning svg,
.clip-menu-item-reported svg,
.post-menu-item-reported svg {
    color: var(--warning-color, #f39c12) !important;
}

.clip-menu-item-warning:hover,
.clip-menu-item-reported:hover,
.post-menu-item-reported:hover {
    background: rgba(243, 156, 18, 0.1) !important;
}

.clip-comment-action[data-action="report-clip-comment"] {
    color: var(--error-color);
}

.clip-comment-action[data-action="report-clip-comment"]:hover {
    background: rgba(231, 76, 60, 0.1);
}

.clip-comment-action[data-action="report-clip-comment"].reported {
    color: var(--warning-color, #f39c12);
}

.clip-comment-action[data-action="report-clip-comment"].reported:hover {
    background: rgba(243, 156, 18, 0.1);
}

.clip-comments-list .no-comments {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
    text-align: center;
}

#clipViewer .clip-dropdown-menu {
    z-index: 1000005;
}

.post-interaction-item.disabled {
    opacity: 0.6;
    cursor: default;
}

.post-interaction-item.disabled:hover {
    background: transparent;
}

.post-comments.public-comments {
    padding-bottom: 1.25rem;
}

@media (max-width: 768px) {
    .clips-header-volume {
        display: flex !important;
    }

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

    #clipViewer .clip-volume-control,
    .clip-viewer .clip-volume-control {
        display: none !important;
    }

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

    .post-card {
        border-radius: 12px;
    }

    .post-header,
    .post-content,
    .post-comments {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .post-interaction-bar {
        align-items: flex-start;
        flex-direction: column;
    }

    .post-media.media-2 .media-item,
    .post-media.media-3 .media-item,
    .post-media.media-4 .media-item {
        height: 180px;
    }

    .post-media.media-3,
    .post-media.media-4 {
        grid-template-rows: repeat(2, 180px);
    }

    .audio-controls {
        flex-wrap: wrap;
    }

    .post-clips .clip-container {
        width: min(340px, 100%);
        max-width: 100%;
        max-height: none;
        flex-basis: 340px;
    }

    .post-clips .clip-actions {
        right: 8px;
        bottom: 76px;
        gap: 10px;
    }

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

    .clip-comments-panel {
        height: 85%;
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
    }

    .clip-comments-header {
        padding: 16px;
    }

    .clip-comments-header h3 {
        font-size: 16px;
    }

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

    .clip-comment-input-wrapper {
        gap: 8px;
        padding: 12px;
    }

    .clip-reply-input-wrapper {
        margin-left: 40px;
    }

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

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

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

    .lightbox-content {
        padding: 56px 12px 96px;
    }

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

    .clip-viewer-wrapper {
        max-width: none;
    }
}

@media (min-width: 769px) {
    .clips-header-volume {
        display: none !important;
    }
}

@media (max-width: 360px) {
    .clips-header-volume {
        padding: 5px 8px;
    }

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

@media (max-height: 500px) and (orientation: landscape) {
    .clips-header-volume {
        padding: 5px 8px;
    }

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

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

@supports (-webkit-touch-callout: none) {
    .clip-comments-panel .clip-comment-input-wrapper {
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }
}

/* Canonical clip layout shared by feed, profile, community and single post pages. */
.post-clips {
    width: 100%;
}

.post-clips .clip-container {
    width: min(350px, 100%) !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: 9 / 16 !important;
    margin: 0 auto !important;
    background: #000 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
}

.post-clips .clip-video {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain !important;
    transform: none !important;
    background: #000 !important;
    border-radius: 0 !important;
}

#clipViewer.clip-viewer {
    position: fixed !important;
    inset: 0 !important;
    z-index: 1000000 !important;
    display: none;
    overflow: hidden !important;
    background: #000 !important;
}

#clipViewer.clip-viewer.active {
    display: block !important;
}

#clipViewer .clip-viewer-container,
#clipViewer .clip-player-container {
    position: relative !important;
    width: 100vw !important;
    width: 100dvw !important;
    height: 100vh !important;
    height: 100svh !important;
    height: 100dvh !important;
    min-height: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    background: #000 !important;
}

#clipViewer .clip-viewer-wrapper,
#clipViewer.active.maximized .clip-viewer-wrapper,
#clipViewer.fullscreen .clip-viewer-wrapper {
    position: relative !important;
    width: min(100vw, 450px) !important;
    width: min(100dvw, 450px) !important;
    max-width: 450px !important;
    height: 100vh !important;
    height: 100svh !important;
    height: 100dvh !important;
    max-height: none !important;
    margin: 0 auto !important;
    overflow: hidden !important;
    background: #000 !important;
    border-radius: 0 !important;
}

#clipViewer .clip-video {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain !important;
    transform: none !important;
    background: #000 !important;
    border-radius: 0 !important;
}

#clipViewer .clip-overlay {
    position: absolute !important;
    inset: 0 !important;
    z-index: 10 !important;
    pointer-events: none !important;
}

#clipViewer .clip-info {
    left: 16px !important;
    right: 74px !important;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 76px) !important;
    z-index: 12 !important;
    max-width: none !important;
    color: #fff !important;
    pointer-events: auto !important;
}

#clipViewer .clip-actions {
    right: 12px !important;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 78px) !important;
    z-index: 13 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 16px !important;
    pointer-events: auto !important;
}

#clipViewer .clip-controls {
    z-index: 16 !important;
}

#clipViewer .clip-viewer-header {
    z-index: 18 !important;
}

#clipViewer .clip-navigation {
    position: absolute !important;
    inset: 0 !important;
    z-index: 11 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    pointer-events: none !important;
}

#clipViewer .clip-nav-btn {
    pointer-events: auto !important;
}

#clipViewer .clip-comments-panel {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: min(70vh, calc(100vh - 60px)) !important;
    height: min(70dvh, calc(100dvh - 60px)) !important;
    max-height: calc(100vh - 60px) !important;
    max-height: calc(100dvh - 60px) !important;
    z-index: 30 !important;
    transform: translateY(100%) !important;
}

#clipViewer .clip-comments-panel.show {
    transform: translateY(0) !important;
}

#clipViewer:fullscreen,
#clipViewer:-webkit-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    background: #000 !important;
}

#clipViewer:fullscreen .clip-viewer-container,
#clipViewer:fullscreen .clip-player-container,
#clipViewer:-webkit-full-screen .clip-viewer-container,
#clipViewer:-webkit-full-screen .clip-player-container {
    width: 100vw !important;
    height: 100vh !important;
}

@media (max-width: 768px) {
    .post-clips .clip-container {
        width: min(340px, 100%) !important;
    }

    #clipViewer .clip-viewer-wrapper,
    #clipViewer.active.maximized .clip-viewer-wrapper,
    #clipViewer.fullscreen .clip-viewer-wrapper {
        width: 100vw !important;
        width: 100dvw !important;
        max-width: none !important;
    }

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

    #clipViewer .clip-comments-panel {
        height: min(85vh, calc(100vh - 52px)) !important;
        height: min(85dvh, calc(100dvh - 52px)) !important;
        max-height: calc(100vh - 52px) !important;
        max-height: calc(100dvh - 52px) !important;
    }
}
