.posts-container {
    width: 700px;
    max-width: 700px;
    margin-top: 0.5rem;
}

.posts-wrapper {
    display: flex;
    justify-content: center;
    padding: 20px;
    margin-bottom: 1rem;
}


.post {
    background-color: #1a1a3a;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #2a2a4a;
    margin-bottom: 16px;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.name-stack {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    background-color: #333;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.username-container {
    display: flex;
    align-items: center;
    gap: 4px;
}

.displayname {
    font-weight: 600;
    color: #fff
}

.verified-badge {
    background-color: #1d9bf0;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.verified-badge i {
    font-size: 8px;
    color: white;
}

.handle {
    font-size: 14px;
    color: #aaa;
}

.more-wrapper {
    position: relative;
    overflow: visible;
    z-index: 20;
}

.more-options {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    font-size: 16px;
}

.post-content {
    padding: 0 16px 8px;
}

.content-text {
    margin-bottom: 8px;
}

.post-image {
    max-height: 500px;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.post-image img,
.post-image video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    background-color: transparent;
}

.action-button {
    background: none;
    border: none;
    color: white;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 16px;
}


.mention {
    font-weight: bolder;
}

.mention,
.hashtag {
    color: #ff5555;
}

.post-link {
    color: #3b82f6 !important;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s ease;
}

.post-link:hover {
    color: #2563eb !important;
    text-decoration: underline;
}

.post-link:visited {
    color: #7c3aed;
}

.loading {
    margin-top: 20px;
}

.caption-user {
    font-weight: bold;
    margin-right: 6px;
}

.content-text {
    margin-top: 4px;
    font-size: 14px;
    line-height: 1.5;
}

.post-actions {
    border-top: 1px solid #2a2a4a;
    padding: 12px 16px;
    display: flex;
    gap: 16px;
    border-top: none;
}

.skeleton {
    height: 200px;
    background-color: #2a2a4a;
    border-radius: 12px;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}

.skeleton::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0,
            rgba(255, 255, 255, 0.05) 20%,
            rgba(255, 255, 255, 0.1) 60%,
            rgba(255, 255, 255, 0));
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

.end-message {
    text-align: center;
    color: #aaa;
    padding: 16px;
}

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #2a2a4a;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    max-width: 300px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.toast.hidden {
    transform: translateY(100px);
    opacity: 0;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.toast-description {
    font-size: 14px;
    color: #ccc;
}

.hidden {
    display: none;
}

@media (max-width: 768px) {
    .posts-container {
        padding: 0 12px;
    }

    .post {
        display: flex;
        flex-direction: column;
        margin-bottom: 20px;
        width: 350px;
    }

    .post-header {
        order: 0;
    }

    .post-content {
        font-size: small;
        order: 1;
        padding: 8px 16px;
    }

    .post-image {
        order: 2;
    }

    .post-actions {
        order: 3;
        padding: 10px 16px;
        display: flex;
        justify-content: space-between;
    }

    .post-actions .action-button {
        flex: 1;
        text-align: center;
    }

    .post-actions .action-button:first-child {
        text-align: left;
    }

    .post-actions .action-button:nth-child(2) {
        text-align: center;
    }

    .post-actions .action-button:last-child {
        text-align: right;
    }


    .like-count {
        order: 4;
        padding: 0 16px;
        font-weight: 600;
    }

    .view-translation,
    .more-caption {
        order: 5;
        padding: 0 16px;
    }

    .post-header,
    .post-image,
    .post-content,
    .post-actions,
    .comments-section,
    .comment-input {
        order: unset;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 12px;
    }

    .post-header {
        padding: 12px;
    }

    .avatar {
        width: 40px;
        height: 40px;
    }

    .post-image {
        height: 180px;
    }

    .action-button {
        font-size: 14px;
    }
}

.timestamp-inline {
    margin-left: auto;
    font-size: 0.875rem;
    color: #aaa;
}

.action-button {
    display: flex;
    align-items: center;
    gap: 8px;
}

.post .likes-summary {
    padding: 0 16px;
    margin-top: 12px;
    margin-bottom: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #eee;
}

.comments-section {
    padding: 0 16px 16px;
}

.comment {
    display: flex;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #2a2a4a;
}

.comment:last-child {
    border-bottom: none;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-body {
    position: relative;
    display: flex;
    flex-direction: column;
}

.comment-username {
    font-weight: 600;
    color: #fff;
    font-size: 0.9rem;
}

.comment-text {
    color: #ccc;
    font-size: 0.9rem;
    margin: 4px 0;
}

.comment-timestamp {
    font-size: 0.75rem;
    color: #888;
}

.comment-input-container {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.comment-input-container input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #444;
    border-radius: 4px;
    background: #111827;
    color: #fff;
}

.comment-input-container button {
    padding: 0.5rem 1rem;
    background: #ef4444;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.likes-summary {
    padding: 0 16px;
    margin: 12px 0 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #eee;
}

more-wrapper {
    position: relative;
    overflow: visible;
    z-index: 20;
}

.options-dropdown {
    position: absolute;
    top: 28px;
    right: 0;
    background: #1a1a3a;
    border: 1px solid #2a2a4a;
    border-radius: 6px;
    padding: 4px 0;
    z-index: 999;
    min-width: 100px;
}

.option-btn {
    width: 100%;
    padding: 8px 12px;
    background: none;
    border: none;
    color: #fff;
    text-align: left;
    cursor: pointer;
}

.option-btn:hover {
    background: #2a2a4a;
}

.post-media {
    margin-bottom: 12px;
}

.post-image,
.post-video {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
}

.comment-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.comment-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.comment-options-wrapper {
    position: relative;
    display: flex;
    align-items: flex-start;
}

.comment-options-wrapper .more-options {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 4px;
    font-size: 16px;
}

.read-more {
    background: none;
    border: none;
    color: #666;
    /* grayish text */
    cursor: pointer;
    font-size: 0.9rem;
    /* a bit smaller than body text */
    padding: 0;
    margin-left: 0.25rem;
    /* small gap before the link */
    text-decoration: underline;
}

.read-more:hover {
    color: #444;
    /* darker gray on hover */
}

.badge-line {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.user-badge {
    width: 16px;
    height: 16px;
    object-fit: contain;
    position: relative;
    top: 0px !important;
    margin-left: 0.25rem;
}

@keyframes pulse-neon {

    0%,
    100% {
        box-shadow:
            0 0 4px rgba(255, 0, 0, 0.733),
            0 0 8px rgba(255, 17, 0, 0.5);
    }

    50% {
        box-shadow:
            0 0 8px rgba(255, 69, 0, 1),
            0 0 16px rgba(255, 0, 0, 0.8);
    }
}

.staff-post {
    position: relative;
    /* ensure shadow isn’t clipped */
    border: 1px solid transparent;
    border-radius: 0.5rem;
    /* match your style */
    animation: pulse-neon 2s ease-in-out infinite;
}

.post-image .clickable-img {
    cursor: zoom-in;
    transition: transform 0.2s;
}

.post-image .clickable-img:hover {
    transform: scale(1.02);
}

/* lightbox */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    cursor: zoom-out;
}

.lightbox-image {
    max-width: 90%;
    max-height: 90%;
    cursor: grab;
    /* For desktop drag-to-pan */
}

.lightbox-image:active {
    cursor: grabbing;
}

/* OPTIONAL: enable pinch-zoom on mobile */
.lightbox-overlay {
    touch-action: none;
}