.avatar { border-radius: 50%; object-fit: cover; border: 2px solid var(--primary); }

.back-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 16px; border-radius: 24px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    color: var(--text-secondary); text-decoration: none;
    font-size: 0.84rem; font-weight: 600;
    transition: all 0.2s;
}
.back-btn:hover { border-color: var(--border-hover); color: var(--gold); background: rgba(245,158,11,0.1); }


/* ── Glass Card ── */
.glass-card {
    background: var(--glass-card);
    backdrop-filter: blur(20px) saturate(145%);
    -webkit-backdrop-filter: blur(20px) saturate(145%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* ── Post Header ── */
.post-header {
    border-bottom: 1px solid var(--border);
    position: relative;
}

.header-top {
    display: flex;
    justify-content: space-between;
    padding: 0px 10px;
}

/* Avatar link */
.header-top .avatar-link {
    flex-shrink: 0;
    display: block;
    line-height: 0;
}
.header-top .avatar-link .avatar {
    width: 44px;
    height: 44px;
}

.post-header .header-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Username row */
.post-username {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    text-align: center;
    flex-wrap: wrap;
    gap: 4px;
    line-height: 1.3;
}
.post-username a {
    color: var(--text-primary);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}
.post-username a:hover { color: var(--primary); }

/* Meta line: time · public */
.post-meta {
    font-size: 0.73rem;
    color: var(--text-muted);
    text-align: center;
    gap: 6px;
    flex-wrap: wrap;
}
.post-meta i { font-size: 0.7rem; }

/* Location */
.post-location a {
    font-size: 0.73rem;
    color: var(--text-muted);
    text-decoration: none;
}
.post-location a:hover { color: var(--gold); }

.post-seen {
    color: var(--text-primary);
    text-align: center;
    text-decoration: none;
    animation: flash 1s linear infinite;
    text-shadow:
        0 0 10px #fff,
        0 0 20px #fff,
        0 0 30px #e60073,
        0 0 40px #e60073,
        0 0 50px #e60073,
        0 0 60px #e60073,
        0 0 70px #e60073;
}

@keyframes flash {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

.connection-cta {
    position: absolute;
    right: 5px;
    bottom: 5px;
    display: flex;
    justify-content: end;
    margin-top: 6px;
}
.connection-btn {
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    background: linear-gradient(90deg, rgba(220, 114, 40, 1) 50%, #000 100%);
	border: none;
	color: #fff;
	font-size: 0.8125rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	white-space: nowrap;
}

.connection-btn:hover {
	transform: scale(1.05);
	box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

/* ── Tag ── */
.trend-tag {
    display: inline-block; padding: 3px 10px;
    border-radius: 20px;
    background: rgba(245,158,11,0.1);
    border: 1px solid rgba(245,158,11,0.2);
    color: var(--gold); font-size: 0.75rem; font-weight: 600;
}

.tag-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.tag-modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    width: 300px;
    max-height: 400px;
    overflow-y: auto;
}

.tag-close {
    float: right;
    cursor: pointer;
    font-size: 20px;
}

.tag-user-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
}

.badge-kind {
    position: absolute;
    top: 5px;
    left: 15px;
    color: var(--text);
}

.badge-bumped {
    position: absolute;
    top: 5px;
    right: 20px;
    color: var(--text);
}

.badge-featured {
    position: absolute;
    top: 5px;
    left: 15px;
}

.post-description-wrapper {
    padding: 0.5rem 1rem;
}

.post-description,
.post-description-full {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    word-wrap: break-word;
    margin: 0;
    white-space: normal !important;
    padding: 0 !important;
}

.post-description {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: opacity 0.3s ease;
}

.post-description.d-none {
    display: none;
}

.post-description-full {
    display: block;
    max-height: 0;
    opacity: 0;
    text-align: start !important;
    white-space: pre-line;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.4s ease,
                padding-top 0.3s ease;
    padding-top: 0;
}

.post-description-full.d-none {
    display: none;
    max-height: 0;
    opacity: 0;
}

.post-description-full:not(.d-none) {
    max-height: 3000px;
    opacity: 1;
    padding-top: 0.5rem;
}

.read-more-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    /* margin-left: 0.5rem; */
    display: inline-block;
    transition: color 0.2s ease, opacity 0.3s ease;
    cursor: pointer;
    font-size: 13px;
}

.read-more-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.description-link {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.description-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ── Post Media Wrap ── */
.post-media-wrap {
    margin: 0.75rem 0;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.3);
}

/* ── Single Media ── */
.post-single-media-wrap {
    position: relative;
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    overflow: hidden;
    border-radius: 0.75rem;
}

.post-single-media {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    position: relative;
    z-index: 2;
    border-radius: 0.75rem;
    transition: opacity 0.3s ease;
}

/* ── Media Error Loader ── */
.media-error-wrap {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 0.75rem;
    min-height: 220px;
    flex-direction: column;
    gap: 0.5rem;
}

.media-error-wrap.show {
    display: flex;
}

.media-error-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 1.5rem;
}

/* ── Spinner (your loader) ── */
.loader {
    --d: 22px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    color: #25b09b;
    box-shadow:
        calc(1*var(--d))      calc(0*var(--d))      0 0,
        calc(0.707*var(--d))  calc(0.707*var(--d))  0 1px,
        calc(0*var(--d))      calc(1*var(--d))       0 2px,
        calc(-0.707*var(--d)) calc(0.707*var(--d))  0 3px,
        calc(-1*var(--d))     calc(0*var(--d))      0 4px,
        calc(-0.707*var(--d)) calc(-0.707*var(--d)) 0 5px,
        calc(0*var(--d))      calc(-1*var(--d))     0 6px;
    animation: l27 1s infinite steps(8);
}

@keyframes l27 {
    100% { transform: rotate(1turn); }
}

/* ── Custom Carousel ── */
.post-custom-carousel {
    position: relative;
    width: 100%;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #000;
    user-select: none;
}

.carousel-track-wrap {
    width: 100%;
    aspect-ratio: 9 / 16; /* vertical/portrait like TikTok for video posts */
    max-height: 520px;
    overflow: hidden;
    border-radius: 0.75rem;
}

/* For image-only carousels, use landscape */
.post-custom-carousel.is-landscape .carousel-track-wrap {
    aspect-ratio: 16 / 9;
    max-height: 380px;
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.carousel-slide-media {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    position: relative;
    z-index: 2;
    display: block;
}

/* ── Mute Button ── */
.video-mute-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: background 0.2s;
    padding: 0;
}

.video-mute-btn:hover {
    background: rgba(255, 140, 0, 0.6);
}

.video-mute-btn svg {
    width: 18px;
    height: 18px;
    fill: #fff;
}

/* ── Controls ── */
.post-custom-carousel .carousel-control-prev,
.post-custom-carousel .carousel-control-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
    padding: 0;
}

.post-custom-carousel .carousel-control-prev { left: 10px; }
.post-custom-carousel .carousel-control-next { right: 10px; }

.post-custom-carousel .carousel-control-prev:hover,
.post-custom-carousel .carousel-control-next:hover {
    background: rgba(255, 140, 0, 0.7);
}

.post-custom-carousel .carousel-control-prev svg,
.post-custom-carousel .carousel-control-next svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

/* ── Indicators ── */
.post-custom-carousel .carousel-indicators {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
    margin: 0;
    padding: 0;
}

.post-custom-carousel .carousel-indicator {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.post-custom-carousel .carousel-indicator.active {
    background: #ff8c00;
    transform: scale(1.35);
}

/* ── Counter ── */
.carousel-counter {
    position: absolute;
    top: 10px;
    right: 12px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    z-index: 10;
}

/* ── Reaction Bar ── */
.reaction-bar {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.8rem; color: var(--text-muted);
    padding: 10px;
    border-bottom: 1px solid var(--border);
}
.reaction-emoji { font-size: 1rem; cursor: pointer; transition: transform 0.15s; }
.reaction-emoji:hover { transform: scale(1.35); }

/* ── Action Buttons ── */
.post-action-btn {
    flex: 1; display: flex; align-items: center; justify-content: center;
    gap: 8px; padding: 10px 6px;
    background: none; border: none; cursor: pointer;
    font-size: 0.86rem; font-weight: 600;
    color: var(--text-muted); border-radius: var(--radius-sm);
    transition: all 0.2s; font-family: 'Sora', sans-serif;
}
.post-action-btn:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
.post-action-btn.liked { color: var(--like); }
.post-action-btn.liked .bi { animation: pop 0.3s ease; }
@keyframes pop { 0%{transform:scale(1)} 50%{transform:scale(1.45)} 100%{transform:scale(1)} }

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

/* ── Comments Section ── */
.post-comments {
    padding: 0px 10px;
}
.comment-input-wrap {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 10px 16px;
    display: flex; align-items: center; gap: 10px;
}
.comment-input {
    flex: 1; background: none; border: none;
    color: var(--text-primary); font-size: 0.88rem;
    font-family: 'Sora', sans-serif;
}
.comment-input:focus { outline: none; }
.comment-input::placeholder { color: var(--text-muted); }
.comment-send {
    background: rgba(245,158,11,0.15); border: 1px solid rgba(245,158,11,0.3);
    border-radius: 50%; width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    color: var(--gold); cursor: pointer; transition: all 0.2s; flex-shrink: 0;
}
.comment-send:hover { background: rgba(245,158,11,0.3); }

/* Comment Item */
.comment-item {
    display: flex; gap: 10px;
    animation: fadeUp 0.35s ease both;
}
@keyframes fadeUp { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }
.comment-item:nth-child(2) { animation-delay: .06s; }
.comment-item:nth-child(3) { animation-delay: .12s; }

.comment-bubble {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 14px 14px 14px 4px;
    padding: 10px 14px; flex: 1;
}
.comment-author { font-size: 0.82rem; font-weight: 700; color: var(--text-primary); }
.comment-text   { font-size: 0.84rem; color: var(--text-secondary); line-height: 1.5; margin-top: 3px; }
.comment-actions { display: flex; gap: 14px; margin-top: 6px; }
.comment-action-link {
    font-size: 0.75rem; color: var(--text-muted);
    cursor: pointer; font-weight: 600; transition: color 0.2s;
}
.comment-action-link:hover { color: var(--gold); }

/* ── Author Info Card ── */
.author-info-card {
    background: rgba(245,158,11,0.06);
    border: 1px solid rgba(245,158,11,0.18);
    border-radius: var(--radius-sm);
    padding: 16px;
}

/* ── Related Posts ── */
.related-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden; cursor: pointer;
    transition: all 0.2s;
}
.related-card:hover { border-color: var(--border-hover); background: rgba(255,255,255,0.06); transform: translateY(-2px); }
.related-card img { width: 100%; height: 110px; object-fit: cover; }
.related-card-body { padding: 10px 12px; }

/* ── Sidebar Sticky ── */
.sidebar-sticky { position: sticky; top: 76px; }

.z1 { position: relative; z-index: 1; }

@media (max-width: 767px) {
    .right-sidebar { display: none; }
    .post-carousel img { max-height: 320px; }
}
