.post-card {
    background: #1e2024;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: visible;
    transition: border-color 0.2s ease;
    transform: translateZ(0);
    backface-visibility: hidden;
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

.post-card[data-pinned="true"] {
    border-color: rgba(251, 191, 36, 0.25);
}

.post-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.post-card.comments-open {
    border-color: rgba(251, 191, 36, 0.2);
}

.post-main {
    background: transparent;
    position: relative;
    overflow: visible;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px 10px;
}

.post-avatar-link {
    flex-shrink: 0;
}

.post-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(251, 191, 36, 0.25);
    transition: border-color 0.2s ease;
}

.post-avatar-link:hover .post-avatar {
    border-color: rgba(251, 191, 36, 0.5);
}

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

.post-display-name {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #fbbf24;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.15s ease;
}

.post-display-name:hover {
    color: #fcd34d;
}

.post-name-badges {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.post-role-badge {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    vertical-align: middle;
    position: relative;
    top: 2px;
}

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

.post-role-badge.owner {
    color: #fbbf24;
}

.post-role-badge.admin {
    color: #a78bfa;
}

.post-role-badge.pinned {
    color: #fbbf24;
    animation: pinPulse 2s ease-in-out infinite;
}

@keyframes pinPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.post-role-badge.yt {
    color: #ef4444;
}

.post-role-badge.xp-event {
    color: #10b981;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}


.post-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    margin-top: 2px;
}

.post-username {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.post-username:hover {
    color: rgba(255, 255, 255, 0.85);
}

.post-time {
    color: rgba(255, 255, 255, 0.45);
}

.post-menu-btn {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.post-menu-btn svg {
    width: 16px;
    height: 16px;
    stroke: rgba(255, 255, 255, 0.35);
    stroke-width: 2;
    fill: none;
}

.post-menu-btn:hover {
    background: rgba(255, 255, 255, 0.06);
}

.post-menu-btn:hover svg {
    stroke: rgba(255, 255, 255, 0.5);
}

.post-menu {
    position: absolute;
    right: 12px;
    top: 50px;
    background: #252830;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 4px;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    min-width: 130px;
    max-height: 280px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.15s ease, visibility 0.15s ease, transform 0.15s ease;
}

.post-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}


.post-menu .menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease;
}

.post-menu .menu-item svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.post-menu .menu-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.post-menu .menu-item.delete {
    color: #f87171;
}

.post-menu .menu-item.delete:hover {
    background: rgba(248, 113, 113, 0.1);
}

.post-menu .menu-item.pin {
    color: #fbbf24;
}

.post-menu .menu-item.pin:hover {
    background: rgba(251, 191, 36, 0.1);
}

.post-menu .menu-item.report {
    color: #fbbf24;
}

.post-menu .menu-item.report:hover {
    background: rgba(251, 191, 36, 0.1);
}

.post-menu .menu-item.bug {
    color: #60a5fa;
}

.post-menu .menu-item.bug:hover {
    background: rgba(96, 165, 250, 0.1);
}

.post-content {
    padding: 4px 16px 14px;
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.92);
    word-wrap: break-word;
}

.post-media {
    margin: 0 12px 12px;
    border-radius: 8px;
    overflow: hidden;
    background: #0d0e10;
    min-height: 100px;
    position: relative;
}

.post-media img {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    display: block;
    opacity: 0;
    transition: opacity 0.3s ease;
    transform: translateZ(0);
}

.post-media img.loaded {
    opacity: 1;
}

.post-media video {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    display: block;
    background: #000;
    transform: translateZ(0);
}

.post-media.post-video {
    min-height: 200px;
}

.post-media.post-video::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #fbbf24;
    border-radius: 50%;
    animation: video-spin 0.8s linear infinite;
    z-index: 1;
    pointer-events: none;
}

.post-media.post-video.video-ready::before {
    display: none;
}

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

.posts-empty {
    text-align: center;
    padding: 48px 20px;
    color: rgba(255, 255, 255, 0.4);
    background: #1e2024;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.posts-empty svg {
    width: 40px;
    height: 40px;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 1.5;
    fill: none;
    margin-bottom: 12px;
}

.posts-empty p {
    font-size: 14px;
    margin: 0;
}