/* IBSocial - Main Stylesheet */
/* Follows the customized homepage dark theme */

/* ==================== BASE STYLES ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 100%);
    background-attachment: fixed;
    color: var(--text-color);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ==================== NAVBAR ==================== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(4, 5, 10, 0.95);
    border-bottom: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    height: 60px;
}

.nav-inner {
    max-width: 975px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.nav-left {
    flex-shrink: 0;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-img {
    height: 32px;
    width: auto;
    border-radius: 6px;
}

.logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-center {
    flex: 1;
    max-width: 270px;
}

.search-container {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-color);
    font-size: 0.9rem;
    transition: background 0.2s, box-shadow 0.2s;
}

.search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 2px rgba(74, 160, 217, 0.2);
}

.search-input::placeholder {
    color: var(--muted);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: rgba(7, 16, 26, 0.98);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.search-results.hidden {
    display: none;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.search-result-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: var(--text-color);
    transition: background 0.2s, color 0.2s;
    position: relative;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    text-decoration: none;
}

.nav-btn.active {
    color: var(--accent);
}

.nav-btn.chat-btn {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
}

.nav-btn.chat-btn:hover {
    opacity: 0.9;
}

.nav-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid transparent;
}

.profile-btn.active .nav-avatar {
    border-color: var(--accent);
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #f44336;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.notification-badge.hidden {
    display: none;
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    padding-top: 20px;
    padding-bottom: 80px;
    min-height: calc(100vh - 60px);
}

/* ==================== MOBILE NAVIGATION ==================== */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
.profile-bio {
    margin-top: 6px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-color);
    white-space: pre-line;
}
    height: 56px;
    background: rgba(4, 5, 10, 0.98);
    border-top: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    z-index: 1000;
}

.mobile-nav-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    transition: color 0.2s;
}

.mobile-nav-btn.active {
    color: var(--accent);
}

.mobile-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

@media (max-width: 768px) {
    .mobile-nav {
        display: flex;
    }

    .nav-center {
        display: none;
    }

    .nav-right .nav-btn:not(.profile-btn) {
        display: none;
    }

    .main-content {
        padding-bottom: 76px;
    }
}

/* ==================== FEED LAYOUT ==================== */
.feed-layout {
    max-width: 975px;
    margin: 0 auto;
    padding: 0 20px;
}

.stories-section {
    margin-bottom: 24px;
    padding: 16px 0;
    border-bottom: 1px solid var(--glass-border);
}

.stories-container {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 4px 0;
    scrollbar-width: none;
}

.stories-container::-webkit-scrollbar {
    display: none;
}

.story-item {
    flex-shrink: 0;
    text-align: center;
    cursor: pointer;
}

.story-avatar {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    object-fit: cover;
    padding: 3px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2), #f77737, #fd1d1d);
}

.story-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--bg-0);
}

.add-story-avatar {
    position: relative;
    background: var(--card-bg);
    border: 2px dashed var(--glass-border);
}

.add-story-avatar img {
    border: none;
}

.add-icon {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 22px;
    height: 22px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    border: 2px solid var(--bg-0);
}

.story-username {
    display: block;
    font-size: 0.75rem;
    color: var(--text-color);
    margin-top: 6px;
    max-width: 66px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.feed-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 32px;
}

@media (max-width: 1024px) {
    .feed-main {
        grid-template-columns: 1fr;
    }

    .feed-sidebar {
        display: block;
        position: fixed;
        top: 64px;
        right: 0;
        bottom: 0;
        width: min(360px, 92vw);
        height: calc(100vh - 64px);
        height: calc(100dvh - 64px);
        padding: 16px;
        background: color-mix(in srgb, var(--bg-0) 90%, transparent);
        border-left: 1px solid var(--glass-border);
        backdrop-filter: blur(14px);
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        transform: translateX(105%);
        transition: transform 0.25s ease;
        z-index: 1200;
    }

    .feed-sidebar.open {
        transform: translateX(0);
    }
}

/* Feed sidebar mobile controls */
.feed-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1100;
}

.feed-sidebar-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.feed-sidebar-toggle {
    display: none;
}

@media (max-width: 1024px) {
    .feed-sidebar-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        position: fixed;
        right: 16px;
        top: 76px;
        padding: 10px 12px;
        border-radius: 999px;
        border: 1px solid var(--glass-border);
        background: color-mix(in srgb, var(--card-bg) 85%, transparent);
        color: var(--text-color);
        backdrop-filter: blur(12px);
        z-index: 1250;
        cursor: pointer;
        box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    }

    .feed-sidebar-toggle svg {
        width: 18px;
        height: 18px;
    }
}

/* Lock scroll when the off-canvas drawer is open (feed/profile) */
html.drawer-open,
body.drawer-open {
    overflow: hidden;
}
body.drawer-open {
    position: fixed;
    width: 100%;
}

/* Profile pinned indicator */
.profile-post-item {
    position: relative;
}

.pinned-indicator {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.55);
    border: 1px solid rgba(255,255,255,0.18);
    backdrop-filter: blur(8px);
    z-index: 5;
}

.pinned-indicator svg {
    width: 16px;
    height: 16px;
    color: #fff;
}

/* ==================== POSTS ==================== */
.posts-feed {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.post-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
}

.post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
}

.post-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.post-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.post-user-info {
    display: flex;
    flex-direction: column;
}

.post-username {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.post-username:hover {
    text-decoration: none;
}

/* Suffix badges */
.suffix-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.2;
    vertical-align: middle;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.comment-username .suffix-badge {
    padding: 1px 5px;
    font-size: 9px;
}

/* Quick-Time Post styling */
.quicktime-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 6px;
    font-size: 14px;
    animation: pulse-glow 2s ease-in-out infinite;
}

.quicktime-timer {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent);
    background: rgba(74, 160, 217, 0.15);
    padding: 2px 6px;
    border-radius: 10px;
    animation: none;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.quicktime-post {
    border: 1px solid var(--accent);
    box-shadow: 0 0 15px rgba(74, 160, 217, 0.15);
}

.quicktime-post .post-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
}

.quicktime-post .post-header {
    position: relative;
}

/* Toggle hint text */
.toggle-hint {
    font-size: 0.75rem;
    color: var(--muted);
    font-weight: 400;
    display: block;
    margin-top: 2px;
}

.post-location {
    font-size: 0.75rem;
    color: var(--muted);
}

.post-menu-btn {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.post-menu-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.post-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Admin-only delete button (shown on hover/focus) */
.admin-delete-btn {
    background: rgba(244, 67, 54, 0.08);
    border: 1px solid rgba(244, 67, 54, 0.22);
    color: #ff6b6b;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: opacity 0.15s ease, transform 0.15s ease, background 0.2s, border-color 0.2s;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-2px);
}

.post-card:hover .admin-delete-btn,
.post-card:focus-within .admin-delete-btn,
.post-page-card:hover .admin-delete-btn,
.post-page-card:focus-within .admin-delete-btn {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.admin-delete-btn:hover {
    background: rgba(244, 67, 54, 0.14);
    border-color: rgba(244, 67, 54, 0.35);
}

.post-media {
    position: relative;
    background: #000;
    overflow: hidden;
}

/* Text-only posts should be compact (no forced square) */
.post-card.text-only-post .post-media {
    aspect-ratio: auto;
    background: transparent;
}

.post-card.text-only-post .text-only-block {
    min-height: 0;
    padding: 16px;
}

.post-card.text-only-post .post-media .text-only-block {
    height: auto;
    justify-content: flex-start;
}

.text-only-block {
    background: linear-gradient(135deg, rgba(74, 160, 217, 0.14), rgba(91, 79, 184, 0.18));
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: var(--text-color);
}

.post-media .text-only-block {
    height: 100%;
    justify-content: center;
}

.text-only-body {
    font-size: 1rem;
    line-height: 1.6;
    word-break: break-word;
}

.post-media img,
.post-media video {
    width: 100%;
    height: auto;
    display: block;
    max-height: 85vh;
    object-fit: contain;
}

/* ==================== POST AUDIO BUTTON ==================== */
.post-audio-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: background 0.2s, transform 0.15s;
    backdrop-filter: blur(4px);
}

.post-audio-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.post-audio-btn.playing {
    background: rgba(74, 160, 217, 0.7);
    border-color: rgba(74, 160, 217, 0.5);
    animation: audioWave 1.2s ease-in-out infinite;
}

@keyframes audioWave {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.post-audio {
    display: none;
}

/* Post page audio button positioning */
.post-page-media {
    position: relative;
}

.post-page-media .post-audio-btn {
    bottom: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
}

/* ==================== CAROUSEL STYLES ==================== */
.post-carousel {
    position: relative;
    background: #000;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    touch-action: pan-y pinch-zoom;
    max-height: 85vh;
}

.carousel-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.carousel-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.carousel-slide img,
.carousel-slide video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: opacity 0.2s, transform 0.2s;
}

.carousel-nav:hover {
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav svg {
    color: #333;
}

.carousel-nav.prev {
    left: 12px;
}

.carousel-nav.next {
    right: 12px;
}

.carousel-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.carousel-dot.active {
    background: #fff;
    transform: scale(1.2);
}

.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.carousel-counter {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    z-index: 10;
}

/* Hide nav buttons on mobile (swipe only) */
@media (max-width: 768px) {
    .carousel-nav {
        display: none;
    }
    
    .carousel-dots {
        bottom: 12px;
    }
    
    .carousel-counter {
        top: 12px;
        right: 12px;
        padding: 3px 8px;
        font-size: 11px;
    }
}

.post-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
}

.post-actions-left {
    display: flex;
    gap: 16px;
}

.action-btn {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, color 0.2s;
}

.action-btn:hover {
    transform: scale(1.1);
}

.action-btn.liked {
    color: #f44336;
}

.action-btn.liked svg {
    fill: #f44336;
}

.action-btn.favorited {
    color: #ffc107;
}

.action-btn.favorited svg {
    fill: #ffc107;
}

.post-likes {
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0 16px;
    margin-bottom: 8px;
}

.post-caption {
    padding: 0 16px 12px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.post-caption-text,
.post-caption-full .post-caption-text,
.text-only-body {
    display: block;
    white-space: normal;
}

.post-caption-text.clamped,
.post-caption-full .post-caption-text.clamped {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-only-body.clamped {
    display: -webkit-box;
    -webkit-line-clamp: 8;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.caption-toggle {
    background: none;
    border: none;
    color: var(--accent);
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.caption-toggle:hover {
    color: var(--text-color);
}

.post-caption-username {
    font-weight: 600;
    margin-right: 6px;
}

.post-comments-preview {
    padding: 0 16px 8px;
}

.view-comments {
    color: var(--muted);
    font-size: 0.9rem;
    cursor: pointer;
}

.view-comments:hover {
    color: var(--text-color);
}

.post-time {
    padding: 0 16px 12px;
    font-size: 0.7rem;
    color: var(--muted);
    text-transform: uppercase;
}

.post-add-comment {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-top: 1px solid var(--glass-border);
}

.post-add-comment input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 0.9rem;
    outline: none;
}

.post-add-comment input::placeholder {
    color: var(--muted);
}

.post-comment-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-weight: 600;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.post-comment-btn:not(:disabled) {
    opacity: 1;
}

.post-comment-btn:not(:disabled):hover {
    color: var(--accent-2);
}

/* ==================== SIDEBAR ==================== */
@media (min-width: 1025px) {
    .feed-sidebar {
        position: sticky;
        top: 80px;
    }
}

.sidebar-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.user-card-link {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.user-card-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.user-card-username {
    font-weight: 600;
    color: var(--text-color);
}

.user-card-badge {
    display: inline-block;
    font-size: 0.7rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    margin-top: 4px;
}

.sidebar-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 600;
}

.sidebar-card-header a {
    font-size: 0.8rem;
    font-weight: 600;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.suggestion-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.suggestion-info {
    flex: 1;
    min-width: 0;
}

.suggestion-username {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color);
    text-decoration: none;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.suggestion-meta {
    font-size: 0.75rem;
    color: var(--muted);
}

.follow-btn-small {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.follow-btn-small:hover {
    color: var(--accent-2);
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    color: var(--text-color);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s;
}

.quick-link:hover {
    color: var(--accent);
    text-decoration: none;
}

/* Sidebar Search */
.sidebar-search {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--glass-border);
}

.sidebar-search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.sidebar-search-container .search-icon {
    position: absolute;
    left: 12px;
    color: var(--muted);
    pointer-events: none;
}

.sidebar-search-input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-color);
    font-size: 0.9rem;
    transition: border-color 0.2s, background 0.2s;
}

.sidebar-search-input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.06);
}

.sidebar-search-input::placeholder {
    color: var(--muted);
}

.sidebar-search-container .search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: rgba(7, 16, 26, 0.98);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 100;
}

.sidebar-footer {
    text-align: center;
    padding: 16px;
    font-size: 0.75rem;
    color: var(--muted);
}

/* ==================== EXPLORE GRID ==================== */
.explore-layout {
    max-width: 975px;
    margin: 0 auto;
    padding: 0 20px;
}

.explore-search-mobile {
    display: none;
    margin-bottom: 16px;
}

.explore-search-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-color);
    font-size: 1rem;
}

@media (max-width: 768px) {
    .explore-search-mobile {
        display: block;
    }
}

.explore-tabs {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 16px;
}

.explore-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-color);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.explore-tab:hover {
    background: rgba(255, 255, 255, 0.03);
}

.explore-tab.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-color: transparent;
    color: white;
}

.explore-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

@media (max-width: 600px) {
    .explore-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.explore-item {
    position: relative;
    aspect-ratio: 1;
    background: var(--card-bg);
    overflow: hidden;
    cursor: pointer;
}

/* Text-only tiles in image grids (explore/profile) */
.explore-item.grid-text-only,
.profile-post-item.grid-text-only {
    background: linear-gradient(135deg, rgba(74, 160, 217, 0.14), rgba(91, 79, 184, 0.18));
    padding: 14px;
    display: flex;
}

.grid-text-snippet {
    width: 100%;
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.35;
    word-break: break-word;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 7;
    -webkit-box-orient: vertical;
}

.explore-item img,
.explore-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.explore-item:hover img,
.explore-item:hover video {
    transform: scale(1.05);
}

.explore-item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    opacity: 0;
    transition: opacity 0.2s;
}

.explore-item:hover .explore-item-overlay {
    opacity: 1;
}

.explore-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    color: white;
    font-weight: 600;
}

.video-indicator {
    position: absolute;
    top: 12px;
    right: 12px;
    color: white;
}

/* ==================== PROFILE ==================== */
.profile-layout {
    max-width: 975px;
    margin: 0 auto;
    padding: 0 20px;
}

.profile-header {
    display: flex;
    gap: 80px;
    padding: 30px 0 40px;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        text-align: center;
    }
}

.profile-avatar-container {
    position: relative;
    flex-shrink: 0;
}

.profile-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
}

@media (max-width: 768px) {
    .profile-avatar {
        width: 100px;
        height: 100px;
    }
}

.change-avatar-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    background: var(--accent);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.change-avatar-btn:hover {
    transform: scale(1.1);
}

.profile-info {
    flex: 1;
}

.profile-top {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .profile-top {
        justify-content: center;
    }
}

.profile-username {
    font-size: 1.8rem;
    font-weight: 300;
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
    border-radius: 50%;
    font-size: 0.8rem;
    margin-left: 8px;
}

.profile-actions {
    display: flex;
    gap: 10px;
}

.profile-btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.profile-btn.primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
    border: none;
}

.profile-btn.primary:hover {
    transform: translateY(-2px);
}

.profile-btn.secondary {
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--glass-border);
}

.profile-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    text-decoration: none;
}

.profile-stats {
    display: flex;
    gap: 40px;
}

@media (max-width: 768px) {
    .profile-stats {
        justify-content: center;
    }
}

/* Preserve newlines in profile bio */
.profile-bio {
    white-space: pre-wrap;
    margin-top: 10px;
    color: var(--text-color);
}

.stat {
    text-align: center;
}

.stat-count {
    font-weight: 700;
    font-size: 1.1rem;
    display: block;
}

.stat-label {
    color: var(--muted);
    font-size: 0.9rem;
}

.profile-tabs {
    display: flex;
    justify-content: center;
    gap: 40px;
    border-top: 1px solid var(--glass-border);
    margin-bottom: 24px;
}

.profile-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 16px 0;
    background: none;
    border: none;
    border-top: 1px solid transparent;
    margin-top: -1px;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s;
}

.profile-tab.active {
    color: var(--text-color);
    border-top-color: var(--text-color);
}

.profile-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

@media (max-width: 600px) {
    .profile-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.profile-post-item {
    position: relative;
    aspect-ratio: 1;
    background: var(--card-bg);
    overflow: hidden;
    cursor: pointer;
}

.profile-post-item img,
.profile-post-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-post-item:hover .explore-item-overlay {
    opacity: 1;
}

.no-posts-message {
    text-align: center;
    padding: 60px 20px;
}

.no-posts-message svg {
    color: var(--muted);
    margin-bottom: 20px;
}

.no-posts-message h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

/* Empty Feed State */
.empty-feed {
    text-align: center;
    padding: 60px 20px;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    margin: 20px 0;
}

.empty-feed svg {
    color: var(--muted);
    margin-bottom: 20px;
}

.empty-feed h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.empty-feed p {
    color: var(--muted);
    margin-bottom: 20px;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.no-posts-message p {
    color: var(--muted);
    margin-bottom: 20px;
}

/* ==================== LOADING ==================== */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: var(--muted);
}

.loading-spinner.hidden {
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==================== LOAD MORE ==================== */
.load-more-container {
    padding: 30px;
    text-align: center;
}

.load-more-btn {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 12px 40px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.load-more-btn:hover {
    background: var(--accent);
    color: white;
}

/* ==================== MODALS ==================== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
}

.modal-content {
    position: relative;
    width: 92%;
    max-width: 520px;
    max-height: 90vh;
    overflow: auto;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    z-index: 1;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--glass-border);
}

.modal-header h3 {
    font-size: 1.05rem;
    margin: 0;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    padding: 4px 8px;
}

.modal-close:hover {
    color: var(--text-color);
}

.modal-body {
    padding: 18px;
}

/* User lists inside modals (likes/followers/following) */
.user-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.02);
}

.user-list-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-color);
    text-decoration: none;
    min-width: 0;
    flex: 1;
}

.user-list-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.user-list-username {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-clickable {
    cursor: pointer;
}

.like-count {
    cursor: pointer;
}

.modal-label {
    display: block;
    margin: 0 0 8px;
    font-weight: 600;
    color: var(--text-color);
}

.modal-input,
.modal-textarea {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-color);
    padding: 12px;
    font-size: 0.95rem;
}

.modal-textarea {
    resize: vertical;
    min-height: 110px;
    margin-bottom: 14px;
}

.modal-input {
    margin-bottom: 16px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ==================== STORY VIEWER ==================== */
.story-viewer {
    position: relative;
    width: 100%;
    max-width: 420px;
    height: 90vh;
    max-height: 750px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

.story-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
}

.story-progress {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    z-index: 5;
}

.story-progress-bar {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.story-progress-bar.active .story-progress-fill {
    animation: story-progress 5s linear forwards;
}

.story-progress-bar.viewed .story-progress-fill {
    width: 100%;
}

.story-progress-fill {
    height: 100%;
    background: white;
    width: 0;
}

@keyframes story-progress {
    to {
        width: 100%;
    }
}

.story-header {
    position: absolute;
    top: 20px;
    left: 16px;
    right: 60px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 5;
}

.story-header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.story-header-username {
    font-weight: 600;
    color: white;
}

.story-header-time {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
}

.story-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-content img,
.story-content video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.story-nav {
    position: absolute;
    inset: 0;
    display: flex;
}

.story-nav-btn {
    flex: 1;
    background: none;
    border: none;
    cursor: pointer;
    color: transparent;
    font-size: 3rem;
}

.story-nav-btn:hover {
    color: rgba(255, 255, 255, 0.5);
}

/* ==================== POST PREVIEW MODAL ==================== */
.post-preview-content {
    position: relative;
    display: flex;
    background: var(--bg-0);
    border-radius: 8px;
    overflow: hidden;
    max-width: 1000px;
    max-height: 90vh;
    width: 95%;
}

@media (max-width: 768px) {
    .post-preview-content {
        flex-direction: column;
        max-width: 500px;
    }
}

.post-preview-media {
    flex: 1;
    max-width: 600px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-preview-media img,
.post-preview-media video {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.post-preview-details {
    width: 340px;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--glass-border);
}

@media (max-width: 768px) {
    .post-preview-details {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--glass-border);
    }
}

.post-preview-header {
    padding: 16px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.post-preview-comments {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

/* Subtle reply button next to comment timestamps */
.comment-reply-btn {
    background: transparent;
    border: none;
    color: var(--muted, #8899a6);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0 6px;
    margin-left: 8px;
    border-radius: 0;
    opacity: 0.95;
}
.comment-reply-btn:hover {
    background: transparent;
    color: var(--text-color);
    text-decoration: underline;
}

/* Text-only comment actions (reply, delete, share) */
.comment-delete-btn,
.comment-action,
.comment-action-btn {
    background: transparent;
    border: none;
    color: var(--muted, #8899a6);
    cursor: pointer;
    padding: 0 6px;
    font-size: 0.9rem;
}
.comment-delete-btn:hover,
.comment-action:hover,
.comment-action-btn:hover {
    color: var(--text-color);
    text-decoration: underline;
}

.comment-item {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

/* Replies container: stack replies under parent with subtle connector */

.comment-replies {
    display: block;
    margin-left: 28px; /* reduced indent so replies sit closer to parent */
    padding-left: 8px;
    border-left: 2px solid rgba(255,255,255,0.03);
    margin-top: 6px;
}

.comment-replies .comment-item {
    margin-bottom: 10px;
}

.reply-indicator {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 6px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-username {
    font-weight: 600;
    margin-right: 6px;
}

.comment-text {
    font-size: 0.9rem;
    line-height: 1.4;
}

.comment-time {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 4px;
}

.post-preview-actions {
    padding: 12px 16px;
    border-top: 1px solid var(--glass-border);
}

/* ==================== TOAST NOTIFICATIONS ==================== */
#toast-container {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 14px 20px;
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    animation: toast-in 0.3s ease;
    min-width: 250px;
    text-align: center;
}

.toast.success {
    border-color: var(--success);
}

.toast.error {
    border-color: var(--error);
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.toast-out {
    animation: toast-out 0.3s ease forwards;
}

/* ==================== SIDEBAR NOTIFICATIONS (RIGHT DRAWER) ==================== */
.sidebar-notifications-card .sidebar-card-header a {
    color: var(--accent);
}

.sidebar-notifications-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 10px;
}

.sidebar-notifications-empty {
    color: var(--muted);
    font-size: 0.9rem;
    padding: 6px 0;
}

.sidebar-notification-item {
    display: flex;
    gap: 10px;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.sidebar-notification-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.sidebar-notification-item.unread {
    border-color: rgba(74, 160, 217, 0.25);
    background: rgba(74, 160, 217, 0.06);
}

.sidebar-notification-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.sidebar-notification-content {
    min-width: 0;
    flex: 1;
}

.sidebar-notification-text {
    font-size: 0.85rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-notification-time {
    margin-top: 2px;
    font-size: 0.75rem;
    color: var(--muted);
}

@keyframes toast-out {
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* ==================== POST PAGE ==================== */
.post-page-layout {
    max-width: 935px;
    margin: 0 auto;
    padding: 20px;
}

.post-page-card {
    display: flex;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    min-height: 500px;
}

/* Compact text-only post page */
.post-page-card.text-only-post {
    min-height: auto;
}

@media (max-width: 768px) {
    .post-page-card {
        flex-direction: column;
    }
}

.post-page-media {
    flex: 1;
    max-width: 600px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    position: relative;
}

.post-page-media.text-only-media {
    background: transparent;
    min-height: auto;
    align-items: stretch;
    justify-content: stretch;
    padding: 16px;
}

.post-page-media.text-only-media .text-only-block {
    width: 100%;
    margin: 0;
}

.post-page-media img,
.post-page-media video {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.post-page-media .no-media {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    opacity: 0.3;
}

/* Post page carousel */
.post-page-carousel {
    width: 100%;
    aspect-ratio: 4 / 5;
    height: auto;
    min-height: 320px;
    max-height: 85vh;
}

.post-page-carousel .carousel-slides {
    height: 100%;
}

.post-page-carousel .carousel-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-page-carousel .carousel-slide img,
.post-page-carousel .carousel-slide video {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.post-page-details {
    width: 335px;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--glass-border);
}

@media (max-width: 768px) {
    .post-page-details {
        width: 100%;
        border-left: none;
    }
}

.post-page-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.post-page-header .post-user {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-color);
}

.post-page-header .post-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.post-page-header .post-username {
    font-weight: 600;
}

.post-page-header .post-menu-btn {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 4px;
}

.post-page-header .post-menu-btn:hover {
    color: var(--text-color);
}

.post-page-content {
    flex: 1;
    overflow-y: auto;
    max-height: 350px;
}

.post-caption-full {
    padding: 14px 16px;
    border-bottom: 1px solid var(--glass-border);
    line-height: 1.5;
}

.post-caption-full .post-caption-username {
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    margin-right: 6px;
}

.post-caption-full .post-caption-username:hover {
    text-decoration: underline;
}

.post-page-footer {
    border-top: 1px solid var(--glass-border);
    padding: 12px 16px;
}

.post-page-footer .post-stats {
    font-size: 0.9rem;
    margin: 8px 0 4px;
}

.post-page-footer .post-time {
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    margin-bottom: 12px;
}

.post-page-footer .post-add-comment {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--glass-border);
}

.post-page-sidebar {
    width: 340px;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--glass-border);
}

@media (max-width: 768px) {
    .post-page-sidebar {
        width: 100%;
        border-left: none;
    }
}

.post-page-comments {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    max-height: 400px;
}

.post-page-actions {
    border-top: 1px solid var(--glass-border);
}

.post-page-add-comment {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-top: 1px solid var(--glass-border);
}

.post-page-add-comment input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 0.9rem;
    outline: none;
}

/* ==================== UPLOAD PROGRESS ==================== */
.upload-progress-container {
    margin-top: 20px;
    display: none;
}

.upload-progress-container.active {
    display: block;
}

.upload-progress-bar {
    height: 4px;
    background: var(--glass-border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.upload-progress-bar .progress {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    width: 0%;
    transition: width 0.2s ease;
}

.upload-progress-text {
    font-size: 0.85rem;
    color: var(--muted);
    text-align: center;
}

}

/* ==================== HIDDEN CLASS ==================== */ */
.hidden {
    display: none !important;
}

/* ==================== POLL WIDGET ==================== */

.post-poll {
    margin: 12px 0;
    padding: 14px 16px;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: var(--card-bg);
}

.poll-question {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 12px;
    color: var(--text-color);
}

.poll-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.poll-option-btn {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--accent);
    border-radius: 8px;
    background: transparent;
    color: var(--text-color);
    font-size: 14px;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s, color 0.15s;
}

.poll-option-btn:hover {
    background: var(--accent);
    color: #fff;
}

.poll-result-row {
    margin-bottom: 6px;
}

.poll-result-bar-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    padding: 8px 10px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.poll-result-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: var(--accent);
    opacity: 0.2;
    border-radius: 8px;
    transition: width 0.4s ease;
    z-index: 0;
}

.poll-result-row.poll-result-chosen .poll-result-bar {
    opacity: 0.4;
}

.poll-result-label {
    position: relative;
    z-index: 1;
    font-size: 14px;
    flex: 1;
    color: var(--text-color);
}

.poll-result-pct {
    position: relative;
    z-index: 1;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    min-width: 38px;
    text-align: right;
}

.poll-meta {
    margin-top: 10px;
    font-size: 12px;
    color: var(--muted);
}

.poll-expired-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.08);
    color: var(--muted);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 11px;
    margin-left: 6px;
}

.poll-expires-tag {
    display: inline-block;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 11px;
    margin-left: 6px;
    background: rgba(255, 200, 0, 0.15);
    color: #f0b429;
}

/* ==================== SLIDER WIDGET ==================== */

.post-slider-widget {
    margin: 12px 0;
    padding: 14px 16px;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: var(--card-bg);
}

.slider-question {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 12px;
    color: var(--text-color);
}

.slider-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.post-slider-input {
    flex: 1;
    min-width: 120px;
    accent-color: var(--accent);
    cursor: pointer;
}

.slider-current-val {
    min-width: 28px;
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    color: var(--accent);
}

.slider-label-min, .slider-label-max {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
}

.slider-submit-btn {
    padding: 7px 16px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: opacity 0.15s;
}

.slider-submit-btn:hover { opacity: 0.88; }

.slider-result {
    font-size: 14px;
    color: var(--text-color);
    padding: 8px 0 2px;
}

.slider-avg-preview {
    margin-top: 6px;
    font-size: 12px;
    color: var(--muted);
}

/* ==================== OWNER REPLIES BAR ==================== */

.owner-replies-bar {
    margin: 8px 0 4px;
    display: flex;
    justify-content: flex-end;
}

.owner-replies-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border: 1px solid var(--accent);
    border-radius: 20px;
    background: transparent;
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.owner-replies-btn:hover {
    background: var(--accent);
    color: #fff;
}

.owner-replies-count {
    background: var(--accent);
    color: #fff;
    border-radius: 10px;
    padding: 0 6px;
    font-size: 11px;
    min-width: 18px;
    text-align: center;
    display: inline-block;
}

/* ==================== Q&A REPLY ==================== */

.comment-qa-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
    transition: background 0.15s;
}

.comment-qa-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.qa-reply-form {
    margin: 6px 0 6px 32px;
    animation: fadein 0.2s;
}

.qa-reply-form-inner {
    border: 1.5px solid var(--accent);
    border-radius: 12px;
    padding: 12px;
    background: var(--card-bg);
}

.qa-reply-hint {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 8px;
}

.qa-reply-textarea {
    width: 100%;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 14px;
    resize: vertical;
    font-family: inherit;
    color: var(--text-color);
    background: var(--bg-0);
}

.qa-reply-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    justify-content: flex-end;
}

.qa-submit-btn {
    padding: 6px 16px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}

.qa-submit-btn:hover { opacity: 0.88; }
.qa-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.qa-cancel-btn {
    padding: 6px 14px;
    background: none;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    color: var(--muted);
}

/* ==================== POLL/SLIDER BUILDER (CREATE PAGE) ==================== */

/* Interactive element buttons (Poll / Slider) */
.interactive-btns {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.interactive-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: 1.5px solid var(--glass-border);
    border-radius: 20px;
    background: transparent;
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.interactive-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.interactive-btn.active {
    border-color: var(--accent);
    background: rgba(74, 160, 217, 0.13);
    color: var(--accent);
}

/* Poll type segmented control */
.poll-type-selector {
    display: flex;
    margin-bottom: 16px;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    overflow: hidden;
}

.poll-type-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.poll-type-btn:first-child {
    border-right: 1px solid var(--glass-border);
}

.poll-type-btn.active {
    background: var(--accent);
    color: white;
}

/* Free response info box */
.poll-fr-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--bg-0);
    border-radius: 8px;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 10px;
}

.poll-see-replies-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

.poll-builder, .slider-builder {
    margin: 12px 0;
    padding: 16px;
    border: 1.5px dashed var(--accent);
    border-radius: 12px;
    background: var(--card-bg);
}

.builder-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--accent);
}

.builder-remove-btn {
    background: none;
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 26px;
    height: 26px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    transition: color 0.15s, border-color 0.15s;
    line-height: 1;
}

.builder-remove-btn:hover {
    color: #f44336;
    border-color: #f44336;
}

.poll-option-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.poll-option-input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: var(--bg-0);
    color: var(--text-color);
}

.poll-option-remove {
    background: none;
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 26px;
    height: 26px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    transition: color 0.15s, border-color 0.15s;
}

.poll-option-remove:hover {
    color: #f44336;
    border-color: #f44336;
}

@keyframes fadein {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
