.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}
.z1 { position: relative; z-index: 1; }

/* ─── Glass Card ─── */
.glass-card {
    background: var(--glass-card);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: border-color 0.25s, transform 0.25s, background 0.25s;
}
.glass-card:hover {
    border-color: var(--border-hover);
    background: var(--glass-hover);
}

.loading-spinner {
    text-align: center;
    padding: 2rem 0;
}

.loader-color {
    color: var(--primary) !important;
}

.noMorePosts {
    text-align: center;
    padding: 2rem 0;
    font-size: 0.875rem;
}

.end-message {
    color: var(--text-primary);
}

/* ==========================================
   POST CARD STYLES
   ========================================== */
.post-card {
    position: relative;
    background-color: var(--glass-card);
    border-radius: 1rem;
    overflow: hidden;
    opacity: 0.95;
    transition: all 0.3s ease;
    z-index: 0;
}

.post-card:hover {
    transform: translateY(-4px);

    border-color: var(--border-hover);
}

.post-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(0deg);
    width: 300%;
    height: 300%;
    
    /* 🔥 glowing orange gradient */
    background: conic-gradient(
        rgba(0,0,0,0),
        rgba(255,140,0,0.9),
        rgba(255,200,100,0.8),
        rgba(255,140,0,0.9),
        rgba(0,0,0,0) 30%
    );

    animation: rotateBorder 6s linear infinite;

    z-index: -2;
}

.post-card::after {
    content: '';
    position: absolute;
    inset: 2px; /* border thickness */
    background: var(--glass-hover);
    border-radius: inherit;
    z-index: -1;

    /* subtle inner glow */
    box-shadow: inset 0 0 10px rgba(255, 140, 0, 0.1);
}

@keyframes rotateBorder {
    100% {
        transform: translate(-50%, -50%) rotate(1turn);
    }
}

.post-card:hover {
    transform: translateY(-6px);
}

.post-card:hover::before {
    animation-duration: 8s;
    filter: blur(2px);
}

/* Post Header */
.post-header {
    padding: 5px;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: end;
    align-items: end;
    gap: 5px;
}

.post-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
    flex-direction: column;
    width: 100%;
}
.post-user-info .user-details {
    text-align: center;
}

.post-menu-btn {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: rgba(255,255,255,0.06);
	border: 1px solid var(--border);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s;
	color: var(--text-secondary);
    position: absolute;
    text-decoration: none;
    top: -110px;
    right: 0;
}

.post-menu-btn:hover {
	background: rgba(245,158,11,0.15);
	border-color: var(--border-hover);
	color: var(--accent);
	transform: translateY(-1px);
}

.connection-cta {
    position: absolute;
    top: 100px;
    right: 20px;
}
.connection-btn {
	padding: 0.4rem .75rem;
	border-radius: 0.5rem;
	background: linear-gradient(135deg, #ff6b35 0%, #f7931e 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);
}

.dropdown .bi-three-dots {
    color: var(--text);
}

.avatar {
    width: 40px;
    height: 40px;
    object-fit: cover;
}

.user-details h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.post-username a {
    color: var(--text-primary);
    text-decoration: none;
}

.verified-icon {
    height: 20px;
    width: 20px;
    margin-top: -5px;
}

.post-location a {
	font-size: 0.875rem;
	color: #999;
	margin: 0;
	text-decoration: none;
}

.post-time {
    font-size: 0.75rem;
}

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

.badge-bumped {
    position: absolute;
    top: 5px;
    right: 20px;
}

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

.post-description-wrapper {
    padding: 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: 3;
    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;
}

/* ─── Sidebar ─── */
.sidebar {
	position: sticky;
	top: 76px;
	max-height: calc(100vh - 90px);
	overflow-y: auto;
	scrollbar-width: thin;
}
.sidebar::-webkit-scrollbar { width: 3px; }

.sidebar-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
}
.sidebar-menu-item:hover, .sidebar-menu-item.active {
    background: rgba(245,158,11,0.12);
    color: var(--accent);
}
.sidebar-menu-item .bi { font-size: 1.1rem; }

.sidebar-section-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 14px 14px 5px;
}

.friend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.friend-item:hover { background: rgba(255,255,255,0.04); color: var(--text-primary); }

.online-dot {
    width: 9px; height: 9px;
    background: #4ade80;
    border-radius: 50%;
    border: 1.5px solid var(--glass-card);
    flex-shrink: 0;
}

/* ─── Story Strip ─── */
.story-strip { 
    display: flex; 
    gap: 10px; overflow-x: auto; 
    Scrollbar-width: thin;
}
.story-strip::-webkit-scrollbar { height: 3px; }

.story-item {
    flex-shrink: 0;
    width: 90px;
    height: 140px;
    border-radius: 12px;
    background: var(--glass);
    border: 1.5px solid var(--border);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s, border-color 0.2s;
}
.story-item:hover { transform: scale(1.04); border-color: var(--accent); }

.story-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%);
}
.story-name {
    position: absolute;
    bottom: 8px; left: 0; right: 0;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}
.story-avatar {
    position: absolute;
    top: 10px; left: 50%;
    transform: translateX(-50%);
    border: 2.5px solid var(--accent);
}
.story-add {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 14px;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 0.73rem;
}
.story-add-icon {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(245,158,11,0.2);
    border: 2px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 2px;
}

/* ─── Post Composer ─── */
.composer-action, .filter-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.2s;
    white-space: nowrap;
}
.composer-action:hover, .filter-btn:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }

.filter-btn.active{
    background: linear-gradient(90deg, rgba(220, 114, 40, 1) 50%, #000 100%);
    color:#fff;
    transform:translateY(-2px);
    border: 0;
}

.post-author { font-weight: 600; font-size: 0.92rem; color: var(--text-primary); }
.post-meta   { font-size: 0.75rem; color: var(--text-muted); }
.post-text   { font-size: 0.9rem; line-height: 1.65; color: var(--text-secondary); }

.fp-profile-buttons {
    display: flex;
    justify-content: space-around;
    padding: 5px 5px 15px 5px;
}

.fp-btn-light {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border) !important;
    color: var(--text-secondary);
}

.fp-btn-light:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text-primary);
}

.fp-btn-verify {
    background: linear-gradient(90deg, rgba(220, 114, 40, 1) 50%, #000 100%);
    color: #fff;
}

.fp-btn-verify:hover {
    background: var(--primary-dark);
    color: #fff;
}

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

/* Sidebar Menu */
.fp-sidebar__menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fp-sidebar__item {
    margin-bottom: 0.5rem;
}

.fp-sidebar__link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: #fff;
    text-decoration: none;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 165, 50, 0.15);
    transition: all 0.3s ease;
    font-size: 0.9375rem;
}

.fp-sidebar__link:hover {
    border-color: rgba(255, 165, 50, 0.6);
    color: #fff;
}

.fp-sidebar__link.active {
    border-color: rgba(255, 165, 50, 0.6);
    color: #dc7228;
}

/* Collapsible Menu */
.fp-sidebar__link[data-bs-toggle="collapse"] {
    position: relative;
}

.fp-sidebar__link[data-bs-toggle="collapse"] i.float-end {
    position: absolute;
    right: 1rem;
    transition: transform 0.3s ease;
}

.fp-sidebar__link[data-bs-toggle="collapse"]:not(.collapsed) i.float-end {
    transform: rotate(180deg);
}

.collapse.show {
    margin-top: 0.5rem;
}

.collapse .fp-sidebar__link {
    padding-left: 2rem;
    font-size: 0.875rem;
}

.logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;

    background: none;
    border: 1px solid rgba(255, 165, 50, 0.15);
    cursor: pointer;

    text-align: left;
    padding: 10px 15px;

    color: inherit;
    font: inherit;
}

.logout-btn:hover {
    border-color: rgba(255, 165, 50, 0.6);
    color: #fff;
}

/* Popular Posts */
.popular-posts-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
}

.popular-posts-loader {
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.popular-post-item {
    display: flex;
    gap: 0.5rem;
    padding: .5rem 0.75rem;
    border-radius: 0.5rem;
    background-color: rgba(15, 11, 28, 0.60);
    border: 1px solid rgba(255, 140, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.popular-post-item:hover {
    background-color: rgba(15, 11, 28, 0.60);
    border-color: rgba(255, 165, 50, 0.6);
}

.popular-post-thumbnail {
    width: 65px;
    height: 65px;
    border-radius: 0.5rem;
    object-fit: cover;
    flex-shrink: 0;
    background-color: #2a2a2a;
}

.video-thumbnail {
    width: 65px;
    height: 65px;
    border-radius: 0.5rem;
    object-fit: cover;
    flex-shrink: 0;
    background-color: #000;
}

.popular-post-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.popular-post-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 0.25rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.popular-post-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: #666;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ─── Responsive ─── */
@media (max-width: 991px) {
    .left-sidebar { display: none; }
}
@media (max-width: 767px) {
    .right-sidebar { display: none; }
    .story-item { width: 80px; height: 120px; }
}
@media (max-width: 575px) {
    .composer-action span, .filter-btn span { display: none; }
    .post-action-btn span { display: none; }
}

/* ── 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;
}

/* Single media - portrait for video, landscape for image */
.post-single-media-wrap {
    position: relative;
    width: 100%;
    background: #000;
    overflow: hidden;
    border-radius: 0.75rem;
}


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

/* ── 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 0;
    border-bottom: 1px solid var(--border);
}

.reaction-emoji {
    margin-right: -10px;
}

.reaction-count, .post-stats {
    color: var(--text);
}

.post-actions {
	flex: 1;
	display: flex;
}

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

.reaction-wrapper {
    position: relative;
}

.reaction-box {
    display: none;
    position: absolute;
    bottom: 50px;
    left: 0;
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 0.75rem;
    padding: 8px 12px;
    z-index: 999;
    white-space: nowrap;
}

.reaction-box::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	width: 0;
	height: 0;
	border-left: 6px solid transparent;
	border-right: 6px solid transparent;
	border-top: 6px solid #1e1e1e;
}

.reaction-box span:hover {
	transform: scale(1.3) translateY(-8px);
}

.reaction-box span img {
    font-size: 26px;
    margin: 0 4px;
    cursor: pointer;
    transition: 0.2s;
}

.reaction-box span img:hover {
    transform: scale(1.4);
    filter: drop-shadow(0 4px 8px rgba(255, 107, 53, 0.5));
}

