/* hub-styles.css — The Hub Network (Reddit-Style Overhaul) v2.0 */

/* ============================================================
   1. MAIN LAYOUT — 3-Column Reddit Grid (Independent Scrolling)
   ============================================================ */
body.hub-page-active {
    overflow-y: auto;
    height: auto;
}

.hub-page-container {
    padding: 120px 20px 40px 20px;
    min-height: 100vh;
    overflow: visible;
    box-sizing: border-box;
    margin-bottom: 50px;
}

#hub-app {
    display: grid;
    grid-template-columns: 240px 1fr 300px;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;

    /* Let page height be driven by main content (endless feed) */
    align-items: start;
    overflow: visible;
}

/* ============================================================
   2. REUSABLE MODULE
   ============================================================ */
.hub-module {
    background: rgba(15, 17, 26, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    padding: 16px;
    margin-bottom: 16px;
}
.hub-module h3 {
    margin: 0 0 12px 0;
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

/* ============================================================
   3. LEFT SIDEBAR — Channel Navigation
   ============================================================ */
.hub-sidebar {
    /* Fixed viewport height — never scrolls with the page */
    position: sticky;
    top: 120px;
    align-self: start;

    height: calc(100vh - 140px);
    max-height: calc(100vh - 140px);

    overflow-y: auto;
    overflow-x: hidden;

    scrollbar-gutter: stable;

    background: rgba(15, 17, 26, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    box-sizing: border-box;
}

.hub-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.hub-sidebar-header h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}
.hub-sidebar-close {
    display: none;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 4px;
}
.hub-channel-list {
    padding: 8px 0;
}
.channel-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    border-left: 3px solid transparent;
}
.channel-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}
.channel-nav-item.active {
    background: rgba(74, 144, 226, 0.1);
    color: #fff;
    border-left-color: #4a90e2;
}
.channel-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a90e2;
}
.channel-nav-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.channel-nav-name {
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.channel-nav-count {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
}
.hub-sidebar-widget {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.hub-sidebar-widget h3 {
    margin: 0 0 10px 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
/* Your Channels widget */
.your-channels-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.your-channels-list .channel-nav-item {
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    border-left: none;
}
.your-channels-list .channel-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
}
.your-channels-list .op-thumb {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    object-fit: cover;
}
.your-channels-empty {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    padding: 10px 0;
}
.your-channels-empty a {
    color: #4a90e2;
    text-decoration: none;
}
.your-channels-empty a:hover {
    text-decoration: underline;
}
.sidebar-loading, .sidebar-error {
    padding: 20px 16px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    text-align: center;
}

/* Scrollbar styles for all columns */
.hub-sidebar::-webkit-scrollbar,
.hub-main-content::-webkit-scrollbar,
.hub-info-sidebar::-webkit-scrollbar {
    width: 4px;
}
.hub-sidebar::-webkit-scrollbar-track,
.hub-main-content::-webkit-scrollbar-track,
.hub-info-sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.hub-sidebar::-webkit-scrollbar-thumb,
.hub-main-content::-webkit-scrollbar-thumb,
.hub-info-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}
.hub-sidebar::-webkit-scrollbar-thumb:hover,
.hub-main-content::-webkit-scrollbar-thumb:hover,
.hub-info-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}
/* Firefox scrollbar — right sidebar layout defined in section 9 below */



/* ============================================================
   4. CENTER — Main Content Area
   ============================================================ */
.hub-main-content {
    min-width: 0;
    min-height: 0;
    overflow-y: visible;
    height: auto;
    padding-bottom: 40px;
    box-sizing: border-box;
}
.hub-sidebar-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    background: rgba(15, 17, 26, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    padding: 10px 16px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    width: 100%;
}

/* Sort Bar */
.hub-sort-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(15, 17, 26, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}
.hub-breadcrumb {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}
.breadcrumb-link {
    color: #4a90e2;
    text-decoration: none;
}
.breadcrumb-link:hover { text-decoration: underline; }
.breadcrumb-sep { margin: 0 6px; }
.breadcrumb-current { color: rgba(255, 255, 255, 0.8); }
.hub-sort-controls {
    display: flex;
    gap: 4px;
}
.sort-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: none;
    border: none;
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.sort-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}
.sort-btn.active {
    background: rgba(74, 144, 226, 0.15);
    color: #4a90e2;
}
.sort-btn svg { flex-shrink: 0; }

/* Create Post Prompt Bar */
.hub-create-prompt {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(15, 17, 26, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    padding: 10px 16px;
    margin-bottom: 12px;
}
.prompt-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}
.hub-create-prompt input {
    flex-grow: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.5);
    padding: 10px 14px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.2s;
}
.hub-create-prompt input:hover { border-color: rgba(255, 255, 255, 0.3); }
.prompt-action-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.5);
    padding: 8px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    display: flex;
}
.prompt-action-btn:hover { color: #4a90e2; border-color: #4a90e2; }

/* ============================================================
   5. POST CARD — Reddit-Style (Vote Column + Content)
   ============================================================ */
.hub-feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.hub-post-card {
    display: grid;
    grid-template-columns: 40px 1fr;
    background: rgba(15, 17, 26, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    overflow: hidden;
    transition: border-color 0.2s;
}
.hub-post-card:hover {
    border-color: rgba(74, 144, 226, 0.25);
}
.hub-post-card.is-pinned {
    border-color: rgba(40, 167, 69, 0.3);
}
.hub-post-card.is-pending {
    border-color: rgba(255, 185, 0, 0.3);
    opacity: 0.85;
}

/* Vote Column */
.vote-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 4px;
    gap: 2px;
    background: rgba(0, 0, 0, 0.15);
}
.vote-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
    display: flex;
}
.vote-btn:hover { background: rgba(255, 255, 255, 0.08); }
.vote-btn.upvote-btn:hover, .vote-btn.upvote-btn.active { color: #ff6b35; }
.vote-btn.downvote-btn:hover, .vote-btn.downvote-btn.active { color: #4a90e2; }
.vote-score {
    font-size: 0.8rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    min-width: 20px;
}
.vote-score.upvoted { color: #ff6b35; }
.vote-score.downvoted { color: #4a90e2; }

/* Post Content Area */
.post-content-area {
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.post-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
    flex-wrap: wrap;
}
.post-meta-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}
.post-meta-author { font-weight: 500; color: rgba(255, 255, 255, 0.7); }
/* Clickable author names (profile pop-up) */
.js-user-profile-trigger,
[data-author-id] {
    cursor: pointer;
    text-decoration: none;
}
.js-user-profile-trigger:hover,
[data-author-id]:hover {
    text-decoration: underline;
    color: var(--accent-primary, rgba(255, 255, 255, 0.95));
}
.post-meta-dot { color: rgba(255, 255, 255, 0.3); }
.post-channel-link {
    color: #4a90e2;
    text-decoration: none;
    font-weight: 600;
}
.post-channel-link:hover { text-decoration: underline; }
.pinned-badge {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}
.pending-badge {
    background: rgba(255, 185, 0, 0.2);
    color: #ffb900;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}
.edited-tag { font-style: italic; color: rgba(255, 255, 255, 0.3); }

/* Global Announcement Badge */
.global-pinned-badge {
    background: rgba(255, 185, 0, 0.2);
    color: #ffb900;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.hub-post-card.is-global-announcement {
    border-left: 3px solid #ffb900;
    background: rgba(255, 185, 0, 0.04);
    border-color: rgba(255, 185, 0, 0.25);
}
.hub-post-card.is-global-announcement:hover {
    border-color: rgba(255, 185, 0, 0.4);
}

/* Admin Tier Badges */
.admin-tier-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-left: 4px;
    vertical-align: middle;
    line-height: 1.4;
}
.tier-moderator {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
}
.tier-senior-mod {
    background: rgba(74, 144, 226, 0.2);
    color: #4a90e2;
}
.tier-head-admin {
    background: rgba(255, 185, 0, 0.2);
    color: #ffb900;
}

/* Creator Badge */
.creator-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-left: 4px;
    vertical-align: middle;
    line-height: 1.4;
    background: rgba(155, 89, 182, 0.2);
    color: #9b59b6;
}

/* Official Channels Section */
.sidebar-section-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 0;
}
.sidebar-official-header {
    padding-bottom: 2px;
}
.official-channel-item {
    position: relative;
}
.official-channel-indicator {
    display: inline-block;
    width: 5px;
    height: 5px;
    background: #4a90e2;
    border-radius: 50%;
    margin-left: 4px;
    vertical-align: middle;
}

/* Global Pin Action Button */
.global-pin-action span {
    color: #ffb900;
}
.global-pin-action:hover {
    background: rgba(255, 185, 0, 0.1) !important;
}

/* Post Title */
.post-title-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.post-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
    color: #f1f1f1;
    line-height: 1.3;
}
.post-title-link:hover .post-title { color: #4a90e2; }
.spoiler-tag {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    flex-shrink: 0;
}
.flair-badge {
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
}

/* Post Body */
.post-body {
    position: relative;
    color: #ddd;
    line-height: 1.5;
    font-size: 0.9rem;
}
.post-body p { margin: 0 0 8px 0; }
.post-text-content { max-height: 250px; overflow: hidden; }
.post-text-content.is-truncated { mask-image: linear-gradient(to bottom, black 70%, transparent 100%); -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%); }
/* Remove height restriction in single post detail view so full content is shown */
.hub-post-detail .post-text-content { max-height: none; overflow: visible; }
.hub-post-detail .post-text-content.is-truncated { mask-image: none; -webkit-mask-image: none; }
.post-body pre { background: rgba(0, 0, 0, 0.4); padding: 12px; border-radius: 4px; overflow-x: auto; }
.post-body code { background: rgba(0, 0, 0, 0.3); padding: 2px 6px; border-radius: 3px; font-size: 0.85em; }
.post-body blockquote { border-left: 3px solid #4a90e2; margin: 8px 0; padding: 4px 12px; color: rgba(255, 255, 255, 0.7); }
.post-body a { color: #4a90e2; }

/* Post Link Preview */
.post-link-preview {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 6px;
}
.post-link-url {
    color: #4a90e2;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}
.post-link-url:hover { text-decoration: underline; }

/* Post Image */
.post-image-container {
    max-height: 500px;
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 6px;
}
.post-image {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: 6px;
}

/* Spoiler */
.hub-post-card.has-spoiler .post-body { filter: blur(8px); pointer-events: none; }
.hub-post-card.has-spoiler .post-title { filter: blur(4px); }
.hub-post-card.spoiler-revealed .post-body,
.hub-post-card.spoiler-revealed .post-title { filter: none; pointer-events: auto; }
.spoiler-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    cursor: pointer;
    z-index: 2;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
}
.hub-post-card.has-spoiler .spoiler-overlay { pointer-events: auto; }
.hub-post-card.spoiler-revealed .spoiler-overlay { display: none; }

/* Post Actions Bar */
.post-actions-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-top: 6px;
    flex-wrap: wrap;
}
.post-action {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    background: none;
    border: none;
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
}
.post-action:hover { background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.8); }
.post-action.is-saved { color: #4a90e2; }
.admin-action { color: rgba(255, 185, 0, 0.7); }
.admin-action:hover { color: #ffb900; background: rgba(255, 185, 0, 0.1); }
.delete-action:hover { color: #dc3545; background: rgba(220, 53, 69, 0.1); }

/* ============================================================
   6. POST DETAIL VIEW
   ============================================================ */
.hub-post-detail { min-height: 400px; }
.hub-post-detail .post-image-container { max-height: none; overflow: visible; }
.hub-post-detail .post-image { max-height: none; }

/* Static (non-clickable) title in detail view */
.post-title-static {
    cursor: default;
    pointer-events: none;
}
.post-title-static:hover .post-title {
    color: inherit;
}

/* Static comments label in detail view — no pointer/hover */
.post-action-static {
    cursor: default;
    pointer-events: none;
}
.back-to-feed-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.7);
    padding: 8px 14px;
    font-size: 0.85rem;
    cursor: pointer;
    margin-bottom: 12px;
    transition: border-color 0.2s, color 0.2s;
}
.back-to-feed-btn:hover { border-color: #4a90e2; color: #4a90e2; }
.back-to-feed-link { color: #4a90e2; text-decoration: none; display: block; margin-top: 12px; }

/* ============================================================
   7. COMMENTS
   ============================================================ */
.post-comments-section { margin-top: 16px; }
.post-comments-section h3 { margin: 0 0 16px 0; font-size: 1rem; color: rgba(255, 255, 255, 0.8); }
.comment-sort-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 0.85rem;
}
.comment-sort-label { color: rgba(255, 255, 255, 0.5); }
.comment-sort-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 0.8rem;
    transition: background 0.15s, color 0.15s;
}
.comment-sort-btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.comment-sort-btn.active { background: rgba(74, 144, 226, 0.15); color: #4a90e2; }

/* Comment thread */
.comment-thread {
    position: relative;
    margin-left: 0;
    padding-left: 0;
}
.comment-thread.depth-1 { margin-left: 20px; }
.comment-thread.depth-2 { margin-left: 20px; }
.comment-thread.depth-3 { margin-left: 20px; }
.comment-thread.depth-4 { margin-left: 20px; }
.comment-thread.collapsed > .comment-replies,
.comment-thread.collapsed > .reply-slot { display: none; }

.thread-line {
    position: absolute;
    left: 12px;
    top: 40px;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: background 0.15s;
}
.thread-line:hover { background: #4a90e2; }

/* Comment row */
.comment-row {
    display: flex;
    gap: 8px;
    padding: 8px 0;
}
.comment-vote-col {
    padding: 0;
    background: none;
    gap: 0;
}
.comment-vote-col .vote-btn svg { width: 16px; height: 16px; }
.comment-vote-col .vote-score { font-size: 0.75rem; }

.comment-body { flex: 1; min-width: 0; }
.comment-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    margin-bottom: 4px;
}
.comment-avatar { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.comment-author { font-weight: 600; color: rgba(255, 255, 255, 0.8); }
.comment-author.is-removed { color: rgba(255, 255, 255, 0.3); font-style: italic; }
.comment-dot { color: rgba(255, 255, 255, 0.25); }
.comment-time { color: rgba(255, 255, 255, 0.4); }
.comment-edited { color: rgba(255, 255, 255, 0.3); font-style: italic; font-size: 0.7rem; }

.comment-content {
    position: relative;
    color: #ddd;
    font-size: 0.88rem;
    line-height: 1.5;
}
.comment-content p { margin: 0 0 6px 0; }
.comment-content.has-spoiler { filter: blur(6px); cursor: pointer; }
.comment-spoiler {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    cursor: pointer;
    color: #fff;
    font-weight: 500;
    font-size: 0.8rem;
}
.removed-text { color: rgba(255, 255, 255, 0.3); font-style: italic; }

.comment-actions {
    display: flex;
    gap: 4px;
    margin-top: 4px;
}
.comment-action {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    padding: 3px 8px;
    border-radius: 3px;
    transition: background 0.15s, color 0.15s;
}
.comment-action:hover { background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.8); }

.continue-thread-link {
    display: inline-block;
    color: #4a90e2;
    font-size: 0.82rem;
    text-decoration: none;
    padding: 8px 0 8px 24px;
    font-weight: 500;
}
.continue-thread-link:hover { text-decoration: underline; }
.no-comments, .comments-loading, .comments-error {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
    padding: 20px 0;
    text-align: center;
}

/* Comment forms */
.comment-form { margin: 12px 0; }
.reply-form { margin-left: 24px; }
.comment-textarea {
    width: 100%;
    min-height: 80px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: #f1f1f1;
    padding: 10px;
    font-size: 0.88rem;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}
.comment-textarea:focus { outline: none; border-color: #4a90e2; box-shadow: 0 0 8px rgba(74, 144, 226, 0.3); }
.comment-form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    justify-content: flex-end;
}
.spoiler-toggle-small {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    margin-right: auto;
}
.comment-cancel-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.6);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.82rem;
    cursor: pointer;
}
.comment-submit-btn {
    background: #4a90e2;
    border: none;
    color: #fff;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}
.comment-submit-btn:hover { background: #5aa1f2; }
.comment-submit-btn:disabled { background: #555c6f; cursor: not-allowed; }

/* Edit comment inline */
.edit-comment-textarea {
    width: 100%;
    min-height: 60px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #4a90e2;
    border-radius: 4px;
    color: #f1f1f1;
    padding: 8px;
    font-size: 0.85rem;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}
.edit-actions { display: flex; gap: 8px; margin-top: 6px; justify-content: flex-end; }
.edit-save-btn { background: #4a90e2; border: none; color: #fff; padding: 5px 14px; border-radius: 4px; font-size: 0.8rem; cursor: pointer; }
.edit-cancel-btn { background: none; border: 1px solid rgba(255, 255, 255, 0.2); color: rgba(255, 255, 255, 0.6); padding: 5px 14px; border-radius: 4px; font-size: 0.8rem; cursor: pointer; }

/* ============================================================
   8. CREATE POST FORM
   ============================================================ */
.hub-create-form {
    background: rgba(15, 17, 26, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    padding: 20px;
}
.hub-create-form h2 {
    margin: 0 0 16px 0;
    font-size: 1.2rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}
.create-form-field {
    position: relative;
    margin-bottom: 12px;
}
.create-channel-select, .create-title-input, .create-link-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: #f1f1f1;
    padding: 10px 14px;
    font-size: 0.9rem;
    font-family: inherit;
    box-sizing: border-box;
}
.create-channel-select { cursor: pointer; }
.create-channel-select option { background: #1c1e26; color: #f1f1f1; }
.create-title-input:focus, .create-link-input:focus, .create-channel-select:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 8px rgba(74, 144, 226, 0.3);
}
.char-count {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
}

/* Type tabs */
.create-type-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 12px;
}
.type-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.type-tab:hover { color: #fff; }
.type-tab.active { color: #4a90e2; border-bottom-color: #4a90e2; }

/* Markdown toolbar */
.markdown-toolbar {
    display: flex;
    gap: 2px;
    padding: 6px 8px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: none;
    border-radius: 6px 6px 0 0;
}
.md-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 3px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
}
.md-btn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.create-content-textarea {
    width: 100%;
    min-height: 150px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0 0 6px 6px;
    color: #f1f1f1;
    padding: 12px;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}
.create-content-textarea:focus { outline: none; border-color: #4a90e2; }

/* Image upload */
.image-upload-area {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.image-upload-area:hover, .image-upload-area.dragover { border-color: #4a90e2; background: rgba(74, 144, 226, 0.05); }
.upload-placeholder { color: rgba(255, 255, 255, 0.4); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.upload-placeholder p { margin: 0; font-size: 0.9rem; }
.image-preview { max-width: 100%; max-height: 300px; border-radius: 6px; }

/* Post options bar */
.create-options-bar {
    display: flex;
    gap: 16px;
    margin: 12px 0;
    flex-wrap: wrap;
}
.create-option { display: flex; align-items: center; }
.create-flair-select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: #f1f1f1;
    padding: 6px 10px;
    font-size: 0.82rem;
    cursor: pointer;
}
.create-flair-select option { background: #1c1e26; }
.spoiler-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    cursor: pointer;
}

/* Create actions */
.create-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.create-cancel-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.6);
    padding: 10px 24px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}
.create-cancel-btn:hover { border-color: #fff; color: #fff; }
.create-submit-btn {
    background: #4a90e2;
    border: none;
    color: #fff;
    padding: 10px 28px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.create-submit-btn:hover { background: #5aa1f2; }
.create-submit-btn:disabled { background: #555c6f; cursor: not-allowed; }

/* ============================================================
   9. RIGHT SIDEBAR — Info & Widgets
   ============================================================ */
.hub-info-sidebar {
    /* Fixed viewport height — never scrolls with the page */
    position: sticky;
    top: 120px;
    align-self: start;

    height: calc(100vh - 140px);
    max-height: calc(100vh - 140px);

    /* Internal scroll only — never scrolls with the page */
    overflow-y: auto;
    overflow-x: hidden;

    /* Prevent width snap when scrollbar appears */
    scrollbar-gutter: stable;

    box-sizing: border-box;
}



/* Search widget */
.hub-search-widget { padding: 10px 12px; }
.search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 8px 12px;
    transition: border-color 0.2s;
}
.search-input-wrapper:focus-within { border-color: #4a90e2; }
.search-input-wrapper svg { color: rgba(255, 255, 255, 0.4); flex-shrink: 0; }
.hub-search-input {
    background: none;
    border: none;
    color: #f1f1f1;
    font-size: 0.85rem;
    width: 100%;
    outline: none;
}

/* Channel info card */
.channel-info-card { }
#channel-info-name { margin: 0 0 8px 0; font-size: 1.1rem; color: #fff; }
#channel-info-description { margin: 0 0 12px 0; font-size: 0.85rem; color: rgba(255, 255, 255, 0.6); line-height: 1.5; }
.channel-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 12px;
}

/* Announcements (right sidebar card) — replace stats with a clean official meta */
.announcement-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.announcement-pill {
    display: inline-flex;
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #ffb900;
    background: rgba(255, 185, 0, 0.12);
    border: 1px solid rgba(255, 185, 0, 0.25);
}

.announcement-note {
    font-size: 0.82rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.45);
}

/* Announcements: official broadcast pill */
.announcement-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ffb900;
    background: rgba(255, 185, 0, 0.15);
    border: 1px solid rgba(255, 185, 0, 0.35);
}
.stat-item { display: flex; flex-direction: column; }
.stat-value { font-size: 1rem; font-weight: 700; color: #fff; }
.stat-label { font-size: 0.72rem; color: rgba(255, 255, 255, 0.4); }
.subscribe-btn {
    width: 100%;
    padding: 8px;
    background: #4a90e2;
    border: none;
    border-radius: 20px;
    color: #fff;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: background 0.2s;
}
.subscribe-btn:hover { background: #5aa1f2; }
.subscribe-btn.is-subscribed { background: none; border: 1px solid rgba(255, 255, 255, 0.3); color: rgba(255, 255, 255, 0.7); }
.subscribe-btn.is-subscribed:hover { border-color: #dc3545; color: #dc3545; }

/* Channel rules */
.channel-rules-list {
    padding-left: 18px;
    margin: 0;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
}
.channel-rules-list li { margin-bottom: 6px; }

/* ============================================================
   9b. OPERATION MODE — Enhanced Sidebar Card
   ============================================================ */

/* Card layout in operation mode */
.channel-info-card.is-operation-mode {
    padding: 0;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}
.channel-info-card.is-operation-mode #channel-info-content {
    padding: 14px 16px 16px;
}

/* Card hover glow */
.channel-info-card.is-operation-mode:hover {
    border-color: rgba(74, 144, 226, 0.25);
    box-shadow: 0 0 24px rgba(74, 144, 226, 0.1), 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Banner image header */
.op-card-banner {
    position: relative;
    height: 120px;
    overflow: hidden;
    cursor: default;
}
.op-card-banner-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}
.channel-info-card.is-operation-mode:hover .op-card-banner-image {
    transform: scale(1.05);
}
.op-card-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(15, 17, 26, 0.95) 0%,
        rgba(15, 17, 26, 0.5) 40%,
        rgba(15, 17, 26, 0.1) 100%
    );
    pointer-events: none;
}

/* Operation name in card */
.channel-info-card.is-operation-mode #channel-info-name {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 6px;
}

/* Owner line */
.op-card-owner {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 10px;
}
.op-card-owner-name {
    color: #4a90e2;
    font-weight: 500;
}

/* Interactive stat items */
.channel-info-card.is-operation-mode .channel-stats {
    gap: 10px;
    margin-bottom: 14px;
}
.channel-info-card.is-operation-mode .stat-item {
    flex: 1;
    padding: 10px 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}
.channel-info-card.is-operation-mode .stat-item:hover {
    background: rgba(74, 144, 226, 0.1);
    border-color: rgba(74, 144, 226, 0.25);
    transform: translateY(-1px);
}
.channel-info-card.is-operation-mode .stat-value {
    font-size: 1.1rem;
    display: block;
}
.channel-info-card.is-operation-mode .stat-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
    display: block;
}

/* Stat entrance animation */
.stat-value.animate-in {
    animation: statCountIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes statCountIn {
    from { opacity: 0; transform: translateY(8px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Subscribe button in operation mode */
.channel-info-card.is-operation-mode .subscribe-btn {
    margin-top: 2px;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.channel-info-card.is-operation-mode .subscribe-btn:active {
    transform: scale(0.97);
}

/* Action buttons (Mod Tools, Settings) */
.op-card-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}
.op-card-action-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.25s, border-color 0.25s, color 0.25s, box-shadow 0.3s, transform 0.15s;
}
.op-card-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
    box-shadow: 0 0 14px rgba(74, 144, 226, 0.12);
}
.op-card-action-btn:active {
    transform: scale(0.97);
}
.op-card-action-btn svg {
    opacity: 0.7;
    transition: opacity 0.2s;
}
.op-card-action-btn:hover svg {
    opacity: 1;
}

/* Compact operation bar (responsive fallback, visible only when sidebar is hidden) */
.op-compact-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(15, 17, 26, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    margin-bottom: 12px;
}
.op-compact-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.op-compact-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.op-compact-stats {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
}
.op-compact-subscribe {
    flex-shrink: 0;
    padding: 6px 16px;
    font-size: 0.8rem;
    width: auto;
}

/* Popular posts widget */
.popular-posts-list { display: flex; flex-direction: column; }
.popular-post-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.15s;
}
.popular-post-item:last-child { border-bottom: none; }
.popular-post-item:hover { background: rgba(255, 255, 255, 0.03); }
.popular-rank {
    font-size: 1.1rem;
    font-weight: 700;
    color: #4a90e2;
    min-width: 20px;
    text-align: center;
}
.popular-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.popular-title { font-size: 0.82rem; color: rgba(255, 255, 255, 0.85); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.popular-meta { font-size: 0.72rem; color: rgba(255, 255, 255, 0.4); }
.widget-loading, .widget-empty { color: rgba(255, 255, 255, 0.4); font-size: 0.82rem; text-align: center; padding: 10px 0; }

/* ============================================================
   10. LOAD MORE & EMPTY STATES
   ============================================================ */
.hub-load-more { text-align: center; padding: 16px; }
.load-more-btn {
    background: rgba(15, 17, 26, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #4a90e2;
    padding: 10px 30px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.load-more-btn:hover { background: rgba(74, 144, 226, 0.1); border-color: #4a90e2; }
.load-more-btn:disabled { color: rgba(255, 255, 255, 0.3); cursor: not-allowed; }
.feed-loading-message, .feed-empty-message {
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    padding: 40px 20px;
    font-size: 0.9rem;
}

/* ============================================================
   11. RESPONSIVE BREAKPOINTS
   ============================================================ */
@media (max-width: 1200px) {
    /* Revert to normal page scroll at tablet breakpoint */
    body.hub-page-active {
        overflow: auto;
        height: auto;
    }
    .hub-page-container {
        height: auto;
        overflow: visible;
        padding-bottom: 40px;
    }
    #hub-app {
        grid-template-columns: 240px 1fr;
        height: auto;
    }
    .hub-info-sidebar { display: none; }
    .hub-main-content {
        overflow-y: visible;
        height: auto;
    }
    .hub-sidebar {
        position: sticky;
        top: 80px;
        height: calc(100vh - 100px);
        max-height: calc(100vh - 100px);
        overflow-y: auto;
    }
    
    /* Show compact operation bar when sidebar is hidden and bar has content (set by JS) */
    .op-compact-bar.is-active { display: flex !important; }
}

@media (max-width: 768px) {
    /* Fully normal scroll for mobile */
    body.hub-page-active {
        overflow: auto;
        height: auto;
    }
    .hub-page-container {
        height: auto;
        overflow: visible;
        padding: 70px 10px 30px 10px;
    }
    #hub-app {
        grid-template-columns: 1fr;
        height: auto;
        gap: 0;
    }
    .hub-main-content {
        overflow-y: visible;
        height: auto;
    }

    /* Sidebar becomes a slide-out drawer */
    .hub-sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        width: 260px;
        height: 100vh;
        max-height: none;
        z-index: 1000;
        border-radius: 0;
        border-right: 1px solid rgba(255, 255, 255, 0.15);
        transition: left 0.3s ease;
        overflow-y: auto;
    }
    
    .hub-sidebar.open { left: 0; }
    .hub-sidebar-close { display: block; }
    .hub-sidebar-toggle { display: flex; }

    /* Post card adjustments */
    .hub-post-card { grid-template-columns: 32px 1fr; }
    .vote-column { padding: 6px 2px; }
    .vote-btn svg { width: 16px; height: 16px; }
    .post-content-area { padding: 8px 10px; }
    .post-title { font-size: 0.95rem; }

    /* Sort bar */
    .hub-sort-bar { flex-direction: column; align-items: flex-start; }

    /* Comments */
    .comment-thread.depth-1, .comment-thread.depth-2,
    .comment-thread.depth-3, .comment-thread.depth-4 { margin-left: 12px; }
}

/* ============================================================
   12. SCROLLBAR
   ============================================================ */
.hub-feed::-webkit-scrollbar,
.comments-list::-webkit-scrollbar { width: 6px; }
.hub-feed::-webkit-scrollbar-track,
.comments-list::-webkit-scrollbar-track { background: transparent; }
.hub-feed::-webkit-scrollbar-thumb,
.comments-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 3px; }

/* ============================================================
   13. SIDEBAR — Operations Section
   ============================================================ */
.sidebar-section-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 8px 16px;
}
.sidebar-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.sidebar-section-action {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    font-size: 1.2rem;
    line-height: 1;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s, transform 0.15s;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    position: relative;
}
.sidebar-section-action:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #4a90e2;
    transform: scale(1.1);
}
.sidebar-section-action[title]:hover::after {
    content: attr(title);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: calc(100% + 6px);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 100;
}
.op-icon { border-radius: 4px; overflow: hidden; }
.op-thumb {
    width: 24px;
    height: 24px;
    object-fit: cover;
    border-radius: 4px;
}
.sidebar-show-all {
    display: block;
    width: 100%;
    padding: 8px 16px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    cursor: pointer;
    text-align: left;
    transition: color 0.15s;
}
.sidebar-show-all:hover { color: #4a90e2; }
.sidebar-empty-ops {
    padding: 8px 16px;
}
.discover-link {
    color: #4a90e2;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
}
.discover-link:hover { text-decoration: underline; }
.sidebar-discover {
    display: block;
    padding: 6px 16px 10px;
}

/* ============================================================
   14. OPERATION BANNER — DEPRECATED (merged into sidebar card, see section 9b)
   ============================================================ */

/* ============================================================
   14b. OPERATION SETTINGS FORM
   ============================================================ */
.op-settings-header {
    margin-bottom: 20px;
}
.op-settings-header h2 {
    margin: 0 0 4px 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
}
.op-settings-subtitle {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}
.op-settings-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.op-settings-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.op-settings-field > label {
    font-size: 0.88rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}
.op-settings-hint {
    font-weight: 400;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.82rem;
}
.op-settings-textarea,
.op-settings-input {
    width: 100%;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: #f1f1f1;
    font-size: 0.88rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.op-settings-textarea:focus,
.op-settings-input:focus {
    border-color: #4a90e2;
}
.op-settings-textarea {
    min-height: 100px;
    resize: vertical;
}
.op-settings-banner-preview {
    width: 100%;
    height: 80px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 6px;
}
/* Rules list */
.op-settings-rules-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.op-settings-rule-item {
    display: flex;
    align-items: center;
    gap: 8px;
}
.op-settings-rule-item .op-rule-input {
    flex: 1;
}
.op-rule-remove-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.5);
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    flex-shrink: 0;
}
.op-rule-remove-btn:hover {
    background: rgba(220, 53, 69, 0.15);
    border-color: #dc3545;
    color: #dc3545;
}
.op-settings-add-rule-btn {
    align-self: flex-start;
    background: none;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.5);
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.82rem;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.op-settings-add-rule-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 0.3);
}
.op-settings-add-rule-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
/* Checkboxes */
.op-settings-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.op-settings-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
}
.op-settings-checkbox-label input[type="checkbox"] {
    accent-color: #4a90e2;
}
/* Toggle */
.op-settings-toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
}
.op-settings-toggle-label input[type="checkbox"] {
    accent-color: #4a90e2;
    width: 18px;
    height: 18px;
}
/* Action buttons */
.op-settings-actions {
    display: flex;
    gap: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.op-settings-cancel-btn {
    padding: 10px 20px;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.op-settings-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.3);
}
.op-settings-save-btn {
    padding: 10px 24px;
    background: #4a90e2;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.op-settings-save-btn:hover { background: #5aa1f2; }
.op-settings-save-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================================
   15. VIDEO POSTS
   ============================================================ */
.video-embed-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 6px;
    background: #000;
}
.video-embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}
.video-thumbnail-container {
    position: relative;
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 6px;
    cursor: pointer;
}
.video-thumbnail-img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16/9;
    object-fit: cover;
}
.video-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    transition: background 0.2s;
}
.video-thumbnail-container:hover .video-play-overlay { background: rgba(0, 0, 0, 0.5); }
.video-play-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.video-play-icon svg { color: #1a1a1a; margin-left: 4px; }
.video-provider-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Video create panel */
.video-url-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: #f1f1f1;
    padding: 10px 14px;
    font-size: 0.9rem;
    font-family: inherit;
    box-sizing: border-box;
}
.video-url-input:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 8px rgba(74, 144, 226, 0.3);
}
#video-preview-container { margin-top: 12px; }

/* Post type badges */
.type-badge {
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}
.type-badge-video {
    background: rgba(255, 0, 0, 0.15);
    color: #ff4444;
}
.type-badge-event {
    background: rgba(74, 144, 226, 0.15);
    color: #4a90e2;
}

/* Operation link in post meta */
.post-operation-link {
    color: #ff6b35;
    text-decoration: none;
    font-weight: 600;
}
.post-operation-link:hover { text-decoration: underline; }

/* ============================================================
   16. EVENT CARDS & CALENDAR
   ============================================================ */
.event-card {
    display: flex;
    gap: 16px;
    background: rgba(15, 17, 26, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    transition: border-color 0.2s;
}
.event-card:hover { border-color: rgba(74, 144, 226, 0.25); }
.event-card-date-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 56px;
    padding: 8px 0;
    background: rgba(74, 144, 226, 0.1);
    border-radius: 6px;
}
.event-card-month { font-size: 0.72rem; font-weight: 600; color: #4a90e2; text-transform: uppercase; }
.event-card-day { font-size: 1.5rem; font-weight: 700; color: #fff; line-height: 1; }
.event-card-year { font-size: 0.7rem; color: rgba(255, 255, 255, 0.4); }
.event-card-content { flex: 1; min-width: 0; }
.event-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.event-card-title { margin: 0; font-size: 1.05rem; font-weight: 600; color: #f1f1f1; }
.event-card-description { margin: 0 0 8px 0; font-size: 0.85rem; color: rgba(255, 255, 255, 0.6); line-height: 1.4; }
.event-card-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 6px;
}
.event-card-time svg { flex-shrink: 0; }
.event-recurrence {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
}
.event-card-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.event-rsvp-count {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.5);
}
.event-rsvp-btn {
    padding: 5px 16px;
    background: #4a90e2;
    border: none;
    border-radius: 14px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.event-rsvp-btn:hover { background: #5aa1f2; }
.event-rsvp-btn.rsvped {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.6);
}
.event-cancel-btn {
    padding: 5px 12px;
    background: none;
    border: 1px solid rgba(220, 53, 69, 0.4);
    border-radius: 14px;
    color: rgba(220, 53, 69, 0.7);
    font-size: 0.78rem;
    cursor: pointer;
}
.event-cancel-btn:hover { border-color: #dc3545; color: #dc3545; }

/* Event status badges */
.event-card-status, .event-widget-status {
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}
.event-status-upcoming { background: rgba(74, 144, 226, 0.15); color: #4a90e2; }
.event-status-live { background: rgba(220, 53, 69, 0.15); color: #dc3545; animation: live-pulse 1.5s ease-in-out infinite; }
.event-status-ended { background: rgba(108, 117, 125, 0.15); color: #6c757d; }
.event-status-cancelled { background: rgba(255, 185, 0, 0.15); color: #ffb900; }
@keyframes live-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }

/* Post-inline event card */
.post-event-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(74, 144, 226, 0.08);
    border: 1px solid rgba(74, 144, 226, 0.15);
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 8px;
}
.post-event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 40px;
}
.post-event-date .event-date-month { font-size: 0.68rem; color: #4a90e2; font-weight: 600; text-transform: uppercase; }
.post-event-date .event-date-day { font-size: 1.3rem; font-weight: 700; color: #fff; line-height: 1; }
.post-event-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 0.82rem; color: rgba(255, 255, 255, 0.5); }
.post-event-time { color: rgba(255, 255, 255, 0.7); }

/* Events widget (right sidebar) */
.events-widget { }
.event-widget-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.event-widget-item:last-child { border-bottom: none; }
.event-widget-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 36px;
}
.event-widget-date .event-date-month { font-size: 0.65rem; color: #4a90e2; font-weight: 600; text-transform: uppercase; }
.event-widget-date .event-date-day { font-size: 1.1rem; font-weight: 700; color: #fff; line-height: 1; }
.event-widget-info { flex: 1; min-width: 0; }
.event-widget-title { font-size: 0.8rem; color: rgba(255, 255, 255, 0.85); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-widget-time { font-size: 0.72rem; color: rgba(255, 255, 255, 0.4); display: block; }
.event-widget-rsvp { font-size: 0.7rem; color: rgba(255, 255, 255, 0.35); white-space: nowrap; }

/* Mini calendar */
.mini-calendar { }
.mini-cal-header {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
    text-align: center;
}
.mini-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    text-align: center;
}
.mini-cal-day-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    padding: 4px 0;
}
.mini-cal-day {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    padding: 4px 0;
    border-radius: 4px;
    cursor: default;
}
.mini-cal-day.today {
    background: rgba(74, 144, 226, 0.2);
    color: #4a90e2;
    font-weight: 700;
}
.mini-cal-day.has-event {
    position: relative;
}
.mini-cal-day.has-event::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ff6b35;
}
.mini-cal-empty { padding: 4px 0; }

/* Events view page */
.hub-events-view { }
#events-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}
#events-calendar { margin-bottom: 16px; }

/* ============================================================
   17. MODERATION PANEL
   ============================================================ */
.hub-mod-tools {
    background: rgba(15, 17, 26, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    padding: 20px;
}
.mod-tools-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.mod-tools-header h2 {
    margin: 0;
    font-size: 1.2rem;
    color: #fff;
}
.mod-tab-bar {
    display: flex;
    gap: 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 16px;
}
.mod-tab-btn {
    padding: 8px 16px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.mod-tab-btn:hover { color: #fff; }
.mod-tab-btn.active { color: #4a90e2; border-bottom-color: #4a90e2; }
.mod-tab-content { display: none; }
.mod-tab-content.active { display: block; }

/* Mod queue */
.mod-queue-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    margin-bottom: 6px;
}
.mod-queue-info { flex: 1; min-width: 0; }
.mod-queue-title { font-size: 0.88rem; color: rgba(255, 255, 255, 0.85); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mod-queue-meta { font-size: 0.75rem; color: rgba(255, 255, 255, 0.4); }
.mod-queue-actions { display: flex; gap: 6px; }
.mod-action-btn {
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: background 0.15s;
}
.mod-approve-btn { background: rgba(40, 167, 69, 0.2); color: #28a745; }
.mod-approve-btn:hover { background: rgba(40, 167, 69, 0.3); }
.mod-delete-btn { background: rgba(220, 53, 69, 0.2); color: #dc3545; }
.mod-delete-btn:hover { background: rgba(220, 53, 69, 0.3); }

/* Banned users list */
.banned-user-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    margin-bottom: 6px;
}
.banned-user-info { font-size: 0.85rem; color: rgba(255, 255, 255, 0.8); }
.banned-user-reason { font-size: 0.75rem; color: rgba(255, 255, 255, 0.4); display: block; }
.mod-unban-btn { background: rgba(40, 167, 69, 0.2); color: #28a745; }

/* Moderator list */
.mod-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    margin-bottom: 6px;
}
.mod-list-name { font-size: 0.88rem; color: rgba(255, 255, 255, 0.85); }
.mod-remove-btn { background: rgba(220, 53, 69, 0.15); color: rgba(220, 53, 69, 0.7); }
.mod-remove-btn:hover { color: #dc3545; }
.mod-add-form {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.mod-add-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: #f1f1f1;
    padding: 8px 12px;
    font-size: 0.85rem;
}
.mod-add-btn {
    padding: 8px 16px;
    background: #4a90e2;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 0.85rem;
    cursor: pointer;
}

/* Mod log */
.mod-log-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.mod-log-table th {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    text-align: left;
    font-weight: 600;
}
.mod-log-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
}

/* Mod modal overlay */
.mod-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}
.mod-modal {
    background: #1c1e26;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 24px;
    max-width: 480px;
    width: 100%;
}
.mod-modal h3 {
    margin: 0 0 16px 0;
    color: #fff;
    font-size: 1.1rem;
}
.mod-modal-field {
    margin-bottom: 14px;
}
.mod-modal-field label {
    display: block;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 4px;
}
.mod-modal-input, .mod-modal-textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: #f1f1f1;
    padding: 10px 12px;
    font-size: 0.88rem;
    font-family: inherit;
    box-sizing: border-box;
}
.mod-modal-textarea { min-height: 80px; resize: vertical; }
.mod-modal-input:focus, .mod-modal-textarea:focus {
    outline: none;
    border-color: #4a90e2;
}
.mod-modal-row {
    display: flex;
    gap: 12px;
}
.mod-modal-row > div { flex: 1; }
.mod-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 16px;
}
.toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
}

/* ============================================================
   18. DISCOVER OPERATIONS PAGE
   ============================================================ */
.hub-discover-grid { }
.discover-search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}
.discover-search-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: #f1f1f1;
    padding: 10px 14px;
    font-size: 0.9rem;
}
#discover-operations-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.discover-op-card {
    background: rgba(15, 17, 26, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.15s;
}
.discover-op-card:hover {
    border-color: rgba(74, 144, 226, 0.3);
    transform: translateY(-2px);
}
.discover-op-banner {
    height: 120px;
    background-size: cover;
    background-position: center;
    background-color: rgba(74, 144, 226, 0.15);
}
.discover-op-info {
    padding: 14px;
}
.discover-op-name {
    margin: 0 0 6px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #f1f1f1;
}
.discover-op-desc {
    margin: 0 0 8px 0;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.4;
}
.discover-op-stats {
    display: flex;
    gap: 16px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.4);
}

/* ============================================================
   19. CREATE OPERATION FORM
   ============================================================ */
.hub-create-operation {
    background: rgba(15, 17, 26, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    padding: 24px;
}
.hub-create-operation h2 {
    margin: 0 0 20px 0;
    font-size: 1.3rem;
    color: #fff;
}
.create-op-field {
    margin-bottom: 16px;
}
.create-op-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 6px;
}
.create-op-select, .create-op-textarea, .create-op-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: #f1f1f1;
    padding: 10px 14px;
    font-size: 0.9rem;
    font-family: inherit;
    box-sizing: border-box;
}
.create-op-textarea { min-height: 100px; resize: vertical; }
.create-op-select option { background: #1c1e26; color: #f1f1f1; }

/* Rules editor */
.create-op-rules-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.create-op-rules-header label { margin-bottom: 0; }
.add-rule-btn {
    padding: 4px 12px;
    background: rgba(74, 144, 226, 0.15);
    border: none;
    border-radius: 4px;
    color: #4a90e2;
    font-size: 0.82rem;
    cursor: pointer;
}
.add-rule-btn:hover { background: rgba(74, 144, 226, 0.25); }
.rule-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.rule-number {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    min-width: 20px;
}
.rule-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    color: #f1f1f1;
    padding: 6px 10px;
    font-size: 0.85rem;
}
.rule-remove {
    background: none;
    border: none;
    color: rgba(220, 53, 69, 0.6);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 2px 6px;
}
.rule-remove:hover { color: #dc3545; }

/* Moderation toggle */
.create-op-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
}

/* Create operation actions */
.create-op-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================================
   20. EMPTY / LOADING STATES (Operations)
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
}
.error-state {
    text-align: center;
    padding: 40px 20px;
    color: #dc3545;
    font-size: 0.9rem;
}

/* ============================================================
   21. RESPONSIVE — Operations & New Components
   ============================================================ */
@media (max-width: 768px) {
    /* Old banner responsive rules removed (banner merged into sidebar card) */
    .event-card {
        flex-direction: column;
        gap: 10px;
    }
    .event-card-date-col {
        flex-direction: row;
        gap: 8px;
        min-width: auto;
        padding: 6px 12px;
    }
    #discover-operations-list {
        grid-template-columns: 1fr;
    }
    .mod-modal {
        max-width: 100%;
    }
    .mod-modal-row {
        flex-direction: column;
    }
}


/* ============================================================
   22. HOMEPAGE — Hero, Trending Carousel, Channel Tiles
   ============================================================ */

/* Homepage container */
/* ============================================================
   HOME FEED — Reddit-style, no hero distractions
   ============================================================ */

#hub-homepage {
    display: block;
    margin-bottom: 12px;
}

/* ============================================================
   Channel Notice Bar — horizontal auto-sliding channel cards
   ============================================================ */

.channel-notice-bar {
    background: var(--hub-card-bg, rgba(255,255,255,0.04));
    border: 1px solid var(--hub-border, rgba(255,255,255,0.07));
    border-radius: 8px;
    padding: 12px 14px 10px;
    margin-bottom: 12px;
}

.channel-notice-bar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.channel-notice-bar-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.4);
}

.home-ops-discover-link {
    font-size: 0.78rem;
    color: #4a90e2;
    text-decoration: none;
    font-weight: 600;
}
.home-ops-discover-link:hover { text-decoration: underline; }

/* Viewport clips the sliding track */
.channel-notice-slider-viewport {
    overflow: hidden;
    position: relative;
    border-radius: 6px;
}

/* Track: flex row, each card = 100% width of viewport */
.channel-notice-track {
    display: flex;
    will-change: transform;
}

/* Each card fills the full viewport width */
.channel-notice-card {
    min-width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
    box-sizing: border-box;
}

.channel-notice-card:hover {
    background: rgba(255,255,255,0.05);
}

.notice-card-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(74,144,226,0.2);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: #4a90e2;
    flex-shrink: 0;
    overflow: hidden;
}

.notice-card-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    gap: 1px;
}

.notice-card-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: rgba(255,255,255,0.88);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notice-card-members {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.38);
}

/* Category badges */
.notice-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 6px;
    border-radius: 3px;
    flex-shrink: 0;
}

.notice-badge-new {
    background: rgba(76, 175, 80, 0.2);
    color: #66bb6a;
}

.notice-badge-discover {
    background: rgba(255, 183, 77, 0.2);
    color: #ffb74d;
}

.notice-card-join-btn {
    padding: 4px 14px;
    border-radius: 20px;
    border: 1px solid #4a90e2;
    background: transparent;
    color: #4a90e2;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}
.notice-card-join-btn:hover { background: #4a90e2; color: #fff; }
.notice-card-join-btn.joined {
    background: rgba(74,144,226,0.12);
    color: rgba(255,255,255,0.5);
    border-color: rgba(255,255,255,0.15);
}

.channel-notice-empty {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.35);
    padding: 8px 0;
}
.channel-notice-empty a { color: #4a90e2; }


/* ============================================================
   23. SIDEBAR ENHANCEMENTS — Activity, Collapsible, Animations
   ============================================================ */

/* Activity badge (blue pill showing new post count) */
.channel-activity-badge {
    background: #4a90e2;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    line-height: 1;
    margin-left: auto;
    flex-shrink: 0;
    animation: badgePop 0.3s ease;
}

@keyframes badgePop {
    0% { transform: scale(0); }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Green activity dot (small pulsing indicator on icon) */
.channel-activity-dot {
    position: absolute;
    top: -1px;
    right: -1px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid #1a1a2e;
    animation: activityPulse 2s ease-in-out infinite;
}

.channel-icon {
    position: relative;
}

/* Nav item hover enhancement */
.channel-nav-item {
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.channel-nav-item:hover {
    transform: translateX(4px);
}

.channel-nav-item:hover .channel-icon svg {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* Active state gradient border */
.channel-nav-item.active {
    position: relative;
}

.channel-nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, #4a90e2, #6bb0ff);
    animation: borderGlow 2s ease-in-out infinite alternate;
}

@keyframes borderGlow {
    0% { opacity: 0.7; }
    100% { opacity: 1; box-shadow: 0 0 8px rgba(74, 144, 226, 0.5); }
}

/* Collapsible operations section */
.sidebar-ops-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0;
    font-size: inherit;
    font-weight: inherit;
    font-family: inherit;
}

.sidebar-ops-toggle:hover {
    color: #4a90e2;
}

.ops-toggle-chevron {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.sidebar-ops-toggle[aria-expanded="false"] .ops-toggle-chevron {
    transform: rotate(-90deg);
}

.sidebar-ops-collapsible {
    max-height: 600px;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.3s ease;
    opacity: 1;
}

.sidebar-ops-collapsible.is-collapsed {
    max-height: 0;
    opacity: 0;
}

/* Home nav item special styling */
.channel-nav-home {
    margin-bottom: 4px;
}


/* ============================================================
   24. POST CARD ANIMATIONS — Entrance, Hover, Vote
   ============================================================ */

/* Card entrance animation */
@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card-animate {
    animation: cardEntrance 0.4s ease forwards;
    opacity: 0;
}

/* Card hover lift */
.hub-post-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hub-post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Vote column click animation */
.vote-click {
    animation: voteClickPop 0.2s ease;
}

@keyframes voteClickPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* Enhanced post title on hover */
.post-title-link:hover .post-title {
    color: #4a90e2;
    transition: color 0.2s ease;
}

/* --- Feed Skeleton Cards --- */
.skeleton-card {
    pointer-events: none;
}

.skeleton-card .vote-column {
    padding: 14px 12px;
}

.skeleton-vote {
    width: 28px;
    height: 80px;
    border-radius: 6px;
}

.skeleton-meta {
    width: 50%;
    height: 12px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.skeleton-title {
    width: 75%;
    height: 18px;
    border-radius: 4px;
    margin-bottom: 12px;
}

.skeleton-body {
    width: 100%;
    height: 40px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.skeleton-actions {
    width: 40%;
    height: 14px;
    border-radius: 4px;
}

/* Shared skeleton shimmer */
.skeleton-block {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.04) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
}

@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}


/* ============================================================
   25. MICRO-INTERACTIONS — Buttons, Transitions, Focus
   ============================================================ */

/* Universal button transform on click */
.subscribe-btn,
.sort-btn,
.op-subscribe-btn,
.op-mod-btn,
.op-settings-btn,
.load-more-btn,
.post-action {
    transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.subscribe-btn:active,
.op-subscribe-btn:active,
.op-mod-btn:active,
.op-settings-btn:active {
    transform: scale(0.96);
}

/* Sort button active scale */
.sort-btn:active {
    transform: scale(0.95);
}

.sort-btn.active {
    position: relative;
}

/* Load more hover effect */
.load-more-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.2);
}

/* Create prompt glow */
.hub-create-prompt {
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.hub-create-prompt:hover {
    box-shadow: 0 0 20px rgba(74, 144, 226, 0.1);
    border-color: rgba(74, 144, 226, 0.3);
}

/* Hub module cards hover (right sidebar info card, rules) */
.hub-module {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hub-module:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

/* Popular post item hover */
.popular-post-item {
    transition: background 0.2s ease, transform 0.15s ease;
}

.popular-post-item:hover {
    transform: translateX(3px);
}

/* Focus visible outlines for accessibility */
.channel-nav-item:focus-visible,
.sort-btn:focus-visible,
.post-action:focus-visible,
.subscribe-btn:focus-visible,
.channel-notice-card:focus-visible {
    outline: 2px solid #4a90e2;
    outline-offset: 2px;
}

/* Smooth scrollbar for main content */
#hub-feed {
    scroll-behavior: smooth;
}


/* ============================================================
   26. HOME FEED RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
    .channel-notice-bar { padding: 10px 10px 6px; }
    .notice-card-join-btn { padding: 3px 10px; }
    /* Disable hover translate on mobile sidebar */
    .channel-nav-item:hover { transform: none; }
}

@media (max-width: 480px) {
    .channel-notice-bar { border-radius: 6px; }
    .notice-card-members { display: none; }
    .notice-badge { display: none; }
}

/* ============================================================
   MODERATION TOOLS UI OVERHAUL
   ============================================================ */
.mod-tools-header {
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(74, 144, 226, 0.2);
    padding-bottom: 15px;
}

.mod-tools-subtitle {
    color: #4a90e2;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    margin-top: 5px;
}

.mod-section-card {
    background: rgba(20, 22, 33, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.mod-section-card h3 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Mod Queue Items */
.mod-queue-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s ease;
}

.mod-queue-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(74, 144, 226, 0.3);
}

.mod-queue-info strong {
    display: block;
    font-size: 1rem;
    color: #e0e0e0;
}

.mod-queue-meta {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Mod Action Buttons */
.mod-action-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Orbitron', sans-serif; /* Matching your site's tech font */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.mod-action-btn.approve-btn {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border-color: rgba(40, 167, 69, 0.2);
}

.mod-action-btn.approve-btn:hover {
    background: #28a745;
    color: #fff;
}

.mod-action-btn.delete-btn {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border-color: rgba(220, 53, 69, 0.2);
}

.mod-action-btn.delete-btn:hover {
    background: #dc3545;
    color: #fff;
}

/* Banned & Mods List */
.mod-banned-item, .mod-mod-item {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

/* ============================================================
   MODERATION TAB NAVIGATION STYLING
   ============================================================ */
.mod-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding: 5px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.mod-tab {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    padding: 10px 20px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

/* Hover state: slight brightening */
.mod-tab:hover {
    color: #fff;
    background: rgba(74, 144, 226, 0.1);
}

/* Active state: Glowing blue underline and bright text */
.mod-tab.active {
    color: #4a90e2;
    background: rgba(74, 144, 226, 0.05);
    text-shadow: 0 0 10px rgba(74, 144, 226, 0.5);
}

.mod-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #4a90e2;
    box-shadow: 0 0 15px #4a90e2;
    animation: tabGlow 1.5s infinite alternate;
}

@keyframes tabGlow {
    from { opacity: 0.6; box-shadow: 0 0 5px #4a90e2; }
    to { opacity: 1; box-shadow: 0 0 15px #4a90e2; }
}

.mod-panel {
    animation: panelSlideIn 0.4s ease-out;
}

@keyframes panelSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   ANNOUNCEMENT CHANNEL — Visual Redesign
   ============================================================ */

/* Announcement channel styling in sidebar — matches default channel style */
.channel-nav-item[data-channel-slug="announcements"] {
    background: transparent;
    border-left-color: transparent;
}
.channel-nav-item[data-channel-slug="announcements"]:hover {
    background: rgba(255, 255, 255, 0.05);
}
.channel-nav-item[data-channel-slug="announcements"].active {
    background: rgba(74, 144, 226, 0.1);
    border-left-color: #4a90e2;
}
.channel-nav-item[data-channel-slug="announcements"] .channel-icon {
    color: #4a90e2;
}

/* Permanent "Joined" badge for announcements */
.announcement-joined-badge {
    font-size: 0.65rem;
    color: #4a90e2;
    background: rgba(74, 144, 226, 0.15);
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 600;
    margin-left: auto;
    flex-shrink: 0;
}

/* Permanent subscribe button for announcements */
.subscribe-btn.announcement-permanent {
    background: rgba(74, 144, 226, 0.15);
    border: 1px solid rgba(74, 144, 226, 0.3);
    color: #4a90e2;
    cursor: default;
}
.subscribe-btn.announcement-permanent:hover {
    background: rgba(74, 144, 226, 0.15);
    border-color: rgba(74, 144, 226, 0.3);
    color: #4a90e2;
}

/* Acknowledgment toggle in create post form */
.ack-toggle-option {
    display: none;
}
.ack-toggle-option.visible {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}
.ack-toggle-option label,
.ack-toggle-option span {
    font-size: 0.85rem;
    color: #ffb900;
    cursor: pointer;
}

/* Announcement info notice (replaces "Joined" button in sidebar) */
.announcement-info-notice {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
    font-style: italic;
    line-height: 1.45;
    margin: 8px 0 0;
    padding: 0;
}

/* Announcement category selector in create form */
.announcement-category-option {
    display: none;
}
.announcement-category-option.visible {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

/* Announcement filter tabs (replacing sort tabs on announcements channel) */
.sort-btn.announcement-filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.sort-btn.announcement-filter-btn.active {
    background: rgba(74, 144, 226, 0.15);
    color: #4a90e2;
    border-color: rgba(74, 144, 226, 0.3);
}

/* ============================================================
   ACKNOWLEDGMENT MODAL
   ============================================================ */
.ack-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}
.ack-modal {
    background: rgba(20, 22, 33, 0.95);
    border: 1px solid rgba(255, 185, 0, 0.3);
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 185, 0, 0.1);
}
.ack-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 185, 0, 0.2);
}
.ack-modal-header svg {
    color: #ffb900;
    flex-shrink: 0;
}
.ack-modal-header h2 {
    margin: 0;
    font-size: 1.2rem;
    color: #ffb900;
}
.ack-modal-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 20px;
}
.ack-announcement-item {
    background: rgba(255, 185, 0, 0.05);
    border: 1px solid rgba(255, 185, 0, 0.15);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}
.ack-announcement-title {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}
.ack-announcement-content {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 12px;
}
.ack-announcement-meta {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.4);
}
.ack-checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 10px;
    background: rgba(255, 185, 0, 0.08);
    border-radius: 6px;
    cursor: pointer;
}
.ack-checkbox-row input[type="checkbox"] {
    accent-color: #ffb900;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.ack-checkbox-row label {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
}
.ack-modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    justify-content: flex-end;
}
.ack-confirm-btn {
    background: #ffb900;
    color: #000;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}
.ack-confirm-btn:hover {
    background: #ffc933;
}
.ack-confirm-btn:disabled {
    background: #555;
    color: #888;
    cursor: not-allowed;
}
.ack-leave-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.6);
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}
.ack-leave-btn:hover {
    border-color: rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 0.8);
}

/* Acknowledgment modal responsive */
@media (max-width: 768px) {
    .ack-modal {
        padding: 20px;
        max-height: 90vh;
    }
    .ack-modal-actions {
        flex-direction: column;
    }
    .ack-confirm-btn,
    .ack-leave-btn {
        width: 100%;
        text-align: center;
    }
}

/* ============================================================
   SCROLL-TO-TOP BUTTON
   ============================================================ */
.scroll-to-top-btn {
    position: sticky;
    bottom: 20px;
    float: right;
    margin-right: 10px;
    margin-top: -50px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(74, 144, 226, 0.8);
    border: 1px solid rgba(74, 144, 226, 0.5);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: opacity 0.3s, background 0.2s;
    backdrop-filter: blur(10px);
}
.scroll-to-top-btn:hover {
    background: rgba(74, 144, 226, 1);
}

@supports not (scrollbar-gutter: stable) {
    .hub-sidebar,
    .hub-main-content,
    .hub-info-sidebar {
        /* Reserve approx scrollbar width to prevent layout jump */
        padding-right: 8px;
        box-sizing: border-box;
    }
}


/* ============================================================
   NEXUS CELLS — EXPLORER & CARD UI
   ============================================================ */

/* Explorer wrapper */
.hub-cell-explorer {
    width: 100%;
}

.explorer-header {
    margin-bottom: 20px;
}

.explorer-header h2 {
    margin: 0 0 6px 0;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    color: #4a90e2;
}

.explorer-header > p {
    margin: 0 0 16px 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* Explorer controls: search + sort */
.explorer-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.explorer-search-wrapper {
    display: flex;
    align-items: center;
    background: rgba(15, 17, 26, 0.6);
    border: 1px solid rgba(74, 144, 226, 0.2);
    border-radius: 8px;
    padding: 8px 12px;
    flex: 1;
    min-width: 180px;
    transition: border-color 0.3s;
}

.explorer-search-wrapper:focus-within {
    border-color: rgba(74, 144, 226, 0.6);
}

.explorer-search-wrapper svg {
    color: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
    margin-right: 8px;
}

.explorer-search-input {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 0.9rem;
    outline: none;
    width: 100%;
}

.explorer-search-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.explorer-sort-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.explorer-sort-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 6px 14px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.25s;
    white-space: nowrap;
}

.explorer-sort-btn:hover {
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(74, 144, 226, 0.4);
}

.explorer-sort-btn.active {
    background: rgba(74, 144, 226, 0.15);
    border-color: rgba(74, 144, 226, 0.5);
    color: #4a90e2;
}

/* Cell card grid */
.cell-explorer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 10px 0 20px;
}

/* Card entrance animation */
@keyframes cellCardEnter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cell card */
.cell-card {
    background: rgba(15, 17, 26, 0.6);
    border: 1px solid rgba(74, 144, 226, 0.15);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: cellCardEnter 0.4s ease-out both;
}

.cell-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(74, 144, 226, 0.4), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.cell-card:hover {
    transform: translateY(-4px);
    border-color: rgba(74, 144, 226, 0.6);
    background: rgba(20, 25, 40, 0.8);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 20px rgba(74, 144, 226, 0.08);
}

.cell-card:hover::before {
    opacity: 1;
}

/* Joined card accent */
.cell-card-joined {
    border-left: 3px solid rgba(80, 200, 120, 0.6);
}

/* Card header: avatar + titles + privacy tag */
.cell-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.cell-card-avatar {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.3), rgba(130, 80, 223, 0.3));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(74, 144, 226, 0.2);
}

.cell-avatar-letter {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #4a90e2;
}

.cell-card-titles {
    flex: 1;
    min-width: 0;
}

.cell-card-titles h4 {
    margin: 0;
    color: #e0e6ed;
    font-size: 1rem;
    font-family: 'Orbitron', sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cell-founder-name {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
}

/* Description */
.cell-card-desc {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0 0 14px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card footer meta */
.cell-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 12px;
}

.cell-member-count {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.45);
}

.cell-member-count svg {
    color: rgba(255, 255, 255, 0.3);
}

/* Privacy tags */
.cell-privacy-tag {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    flex-shrink: 0;
}

.cell-privacy-public {
    background: rgba(80, 200, 120, 0.12);
    color: rgba(80, 200, 120, 0.8);
    border: 1px solid rgba(80, 200, 120, 0.2);
}

.cell-privacy-private {
    background: rgba(255, 180, 50, 0.12);
    color: rgba(255, 180, 50, 0.8);
    border: 1px solid rgba(255, 180, 50, 0.2);
}

/* Joined badge */
.cell-joined-badge {
    padding: 4px 12px;
    border-radius: 12px;
    background: rgba(80, 200, 120, 0.12);
    color: rgba(80, 200, 120, 0.9);
    border: 1px solid rgba(80, 200, 120, 0.25);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-shadow: 0 0 8px rgba(80, 200, 120, 0.3);
}

/* Join button */
.cell-join-btn {
    padding: 5px 14px;
    border-radius: 8px;
    background: transparent;
    color: #4a90e2;
    border: 1px solid rgba(74, 144, 226, 0.4);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    white-space: nowrap;
}

.cell-join-btn:hover {
    background: rgba(74, 144, 226, 0.15);
    border-color: rgba(74, 144, 226, 0.7);
    box-shadow: 0 0 12px rgba(74, 144, 226, 0.15);
}

.cell-join-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Load more cells */
.cell-explorer-load-more {
    text-align: center;
    padding: 20px 0;
}

.load-more-cells-btn {
    background: rgba(74, 144, 226, 0.1);
    border: 1px solid rgba(74, 144, 226, 0.3);
    color: #4a90e2;
    padding: 10px 28px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.25s;
}

.load-more-cells-btn:hover {
    background: rgba(74, 144, 226, 0.2);
    border-color: rgba(74, 144, 226, 0.6);
}

/* Empty / error states */
.cell-explorer-empty,
.cell-explorer-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.95rem;
}

/* Skeleton loading cards */
.cell-card-skeleton {
    pointer-events: none;
    animation: none;
}

.cell-card-skeleton .cell-card-header {
    margin-bottom: 14px;
}

.skeleton-circle {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    animation: skeletonPulse 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

.skeleton-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.skeleton-line {
    height: 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

.skeleton-line.skeleton-title {
    width: 60%;
    height: 14px;
}

.skeleton-line.skeleton-subtitle {
    width: 40%;
    height: 10px;
}

.skeleton-line.skeleton-desc {
    width: 90%;
}

.skeleton-line.skeleton-desc.short {
    width: 55%;
}

.skeleton-line.skeleton-meta {
    width: 70%;
    margin-top: 8px;
}

@keyframes skeletonPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* Create Cell Modal enhancements */
.cell-modal-field-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
}

.cell-slug-preview {
    font-size: 0.75rem;
    color: rgba(74, 144, 226, 0.6);
    font-family: monospace;
}

.cell-char-counter {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.3);
}

.cell-create-error {
    color: #e74c3c;
    font-size: 0.85rem;
    padding: 8px 12px;
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.2);
    border-radius: 6px;
    margin-bottom: 12px;
}

/* Responsive: Cell Explorer */
@media (max-width: 900px) {
    .cell-explorer-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 14px;
    }
    .explorer-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .explorer-sort-group {
        justify-content: flex-start;
    }
}

@media (max-width: 600px) {
    .cell-explorer-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .cell-card {
        padding: 16px;
    }
    .explorer-header h2 {
        font-size: 1.2rem;
    }
}

/* ============================================================
   ENCRYPTION OVERLAY (Locked Cells)
   ============================================================ */
.cell-lock-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 400px;
    text-align: center;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    border-radius: 8px;
    padding: 40px;
}

.cell-lock-container .material-symbols-outlined {
    font-size: 64px;
    color: #4a90e2;
    margin-bottom: 20px;
    text-shadow: 0 0 15px rgba(74, 144, 226, 0.5);
}

.cell-lock-container h3 {
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.cell-lock-container p {
    color: rgba(255, 255, 255, 0.6);
    max-width: 300px;
    margin-bottom: 30px;
}

/* ============================================================
   CHATTER MODULE — Discord/Slack-Style Chat Interface
   ============================================================ */

/* --- Container & Layout --- */
.chatter-module {
    display: flex;
    flex-direction: column;
    background: rgba(15, 17, 26, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    min-height: 500px;
    max-height: calc(100vh - 200px);
    overflow: hidden;
}

.chatter-window {
    flex: 1;
    overflow-y: auto;
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: rgba(0, 0, 0, 0.15);
    scroll-behavior: smooth;
}

/* Scrollbar for chat window */
.chatter-window::-webkit-scrollbar { width: 4px; }
.chatter-window::-webkit-scrollbar-track { background: transparent; }
.chatter-window::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 2px; }
.chatter-window::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.3); }

/* --- Placeholder / Empty State --- */
.chatter-message-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 200px;
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.9rem;
    font-style: italic;
    letter-spacing: 0.5px;
    text-align: center;
    animation: chatterPulse 2.5s ease-in-out infinite;
}

@keyframes chatterPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* --- Individual Messages --- */
.chatter-message {
    display: flex;
    gap: 12px;
    padding: 6px 12px;
    border-radius: 6px;
    transition: background 0.15s;
    position: relative;
}

.chatter-message:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Grouped messages (same author in sequence) — hide avatar, tighten spacing */
.chatter-message.is-grouped {
    padding-top: 2px;
    padding-bottom: 2px;
}

.chatter-message.is-grouped .chatter-avatar {
    visibility: hidden;
    width: 36px;
    flex-shrink: 0;
}

.chatter-message.is-grouped .chatter-message-header {
    display: none;
}

/* --- Avatar --- */
.chatter-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    margin-top: 2px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* --- Message Content --- */
.chatter-message-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chatter-message-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.chatter-author-name {
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
}

.chatter-author-name:hover {
    text-decoration: underline;
}

.chatter-timestamp {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.25);
    flex-shrink: 0;
}

.chatter-message-body {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* --- Spoiler Text --- */
.chatter-message-body .is-spoiler {
    filter: blur(4px);
    cursor: pointer;
    user-select: none;
    transition: filter 0.3s ease;
    padding: 0 2px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.05);
}

.chatter-message-body .is-spoiler.revealed {
    filter: none;
    cursor: text;
    user-select: auto;
    background: rgba(255, 255, 255, 0.08);
}

/* --- Typing Indicator --- */
.typing-indicator {
    min-height: 18px;
    padding: 0 16px 4px;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.3);
    font-style: italic;
}

.typing-indicator:empty {
    display: none;
}

/* --- Input Area --- */
.chatter-input-area {
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 17, 26, 0.3);
}

.chatter-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 8px 12px;
    transition: border-color 0.2s;
}

.chatter-input-wrapper:focus-within {
    border-color: rgba(74, 144, 226, 0.5);
}

#chatter-textarea {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #f1f1f1;
    font-size: 0.9rem;
    font-family: inherit;
    line-height: 1.4;
    resize: none;
    max-height: 120px;
    overflow-y: auto;
}

#chatter-textarea::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.chatter-input-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

/* Spoiler toggle in input */
.chatter-spoiler-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.3);
    transition: background 0.15s, color 0.15s;
}

.chatter-spoiler-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
}

.chatter-spoiler-toggle input[type="checkbox"] {
    display: none;
}

.chatter-spoiler-toggle input[type="checkbox"]:checked + .material-symbols-outlined {
    color: #e67e22;
}

.chatter-spoiler-toggle .material-symbols-outlined {
    font-size: 18px;
}

/* Send button */
.chatter-send-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #4a90e2;
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
    flex-shrink: 0;
}

.chatter-send-btn:hover {
    background: #5a9fef;
    box-shadow: 0 0 12px rgba(74, 144, 226, 0.4);
    transform: scale(1.05);
}

.chatter-send-btn:active {
    transform: scale(0.95);
}

.chatter-send-btn .material-symbols-outlined {
    font-size: 18px;
}

/* ============================================================
   CELL INTRO CONTENT — Rules/About Card
   ============================================================ */

.cell-intro-content {
    padding: 4px 0;
}

.cell-intro-content h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.05rem;
    color: #4a90e2;
    margin: 0 0 12px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(74, 144, 226, 0.15);
    letter-spacing: 0.5px;
}

.cell-intro-content .intro-body {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.65;
}

.cell-intro-content .intro-body p {
    margin: 0 0 8px 0;
}

.cell-intro-content .intro-body p:last-child {
    margin-bottom: 0;
}

/* ============================================================
   CELL INFO CARD MODE — Right Sidebar Overrides
   ============================================================ */

.channel-info-card.is-cell-mode .op-card-owner {
    display: flex !important;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 12px;
}

.channel-info-card.is-cell-mode .op-card-owner svg {
    color: rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

/* ============================================================
   CHATTER MODULE RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
    .chatter-module {
        min-height: 400px;
        max-height: 70vh;
    }
}

@media (max-width: 600px) {
    .chatter-module {
        min-height: 350px;
        border-radius: 0;
    }

    .chatter-message {
        gap: 8px;
        padding: 4px 8px;
    }

    .chatter-avatar {
        width: 30px;
        height: 30px;
    }

    .chatter-message.is-grouped .chatter-avatar {
        width: 30px;
    }

    .chatter-input-wrapper {
        padding: 6px 8px;
    }
}

/* ============================================================
   CELL POSTING BOARD — Feed + Chat Split Layout
   ============================================================ */

#cell-view-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.cell-feed-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
}

/* SEPARATOR */
.cell-feed-chat-separator {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0 0 0;
}
.cell-separator-line {
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}
.cell-separator-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.3);
    white-space: nowrap;
    text-transform: uppercase;
}
.cell-separator-label .material-symbols-outlined {
    font-size: 14px;
    color: #4a90e2;
    opacity: 0.7;
}

.chatter-module--compact {
    min-height: 320px;
    max-height: 420px;
    margin-top: 12px;
}

/* ============================================================
   CELL HEADER BAR — Flat, always-visible cell info strip
   ============================================================ */

.cell-header-bar {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(15, 17, 26, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(14px);
    padding: 14px 18px;
    margin-bottom: 0;
    min-width: 0;
    overflow: hidden;
    position: relative;
    /* Subtle left accent line */
    border-left: 3px solid #4a90e2;
    transition: border-color 0.25s, box-shadow 0.25s;
    animation: cardEntrance 0.35s ease forwards;
    opacity: 0;
}
.cell-header-bar:hover {
    border-color: rgba(74, 144, 226, 0.6);
    box-shadow: 0 0 20px rgba(74, 144, 226, 0.08);
}

/* ---- LEFT: Icon + Name + Description ---- */
.cell-header-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 0;
    min-width: 0;
    padding-right: 18px;
    border-right: 1px solid rgba(255, 255, 255, 0.07);
}

.cell-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(74, 144, 226, 0.12);
    border: 1px solid rgba(74, 144, 226, 0.2);
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s;
}
.cell-header-bar:hover .cell-header-icon {
    background: rgba(74, 144, 226, 0.18);
    border-color: rgba(74, 144, 226, 0.35);
}
.cell-header-icon .material-symbols-outlined {
    font-size: 20px;
    color: #4a90e2;
}

.cell-header-text {
    min-width: 0;
    flex: 1;
}
.cell-header-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.cell-header-name {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.92);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.3px;
    line-height: 1.2;
}
.cell-header-privacy-badge {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 20px;
    flex-shrink: 0;
    white-space: nowrap;
}
.cell-header-privacy-badge.is-public {
    background: rgba(76, 175, 80, 0.12);
    color: #81c784;
    border: 1px solid rgba(76, 175, 80, 0.25);
}
.cell-header-privacy-badge.is-private {
    background: rgba(255, 107, 53, 0.1);
    color: #ff8a65;
    border: 1px solid rgba(255, 107, 53, 0.2);
}
.cell-header-desc {
    margin: 3px 0 0 0;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.42);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

/* ---- CENTER: Stats ---- */
.cell-header-stats {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
    padding: 0 20px;
}
.cell-header-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 12px;
    white-space: nowrap;
}
.cell-header-stat .material-symbols-outlined {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.3);
}
.cell-header-stat-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.82);
    letter-spacing: 0.2px;
}
.cell-header-founder {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cell-header-stat-label {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.32);
    font-weight: 500;
    letter-spacing: 0.3px;
}
.cell-header-stat-divider {
    width: 1px;
    height: 22px;
    background: rgba(255, 255, 255, 0.07);
    flex-shrink: 0;
}

/* ---- RIGHT: Action button ---- */
.cell-header-actions {
    flex-shrink: 0;
    padding-left: 18px;
    border-left: 1px solid rgba(255, 255, 255, 0.07);
}
.cell-header-join-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: rgba(74, 144, 226, 0.15);
    border: 1px solid rgba(74, 144, 226, 0.35);
    border-radius: 8px;
    color: #4a90e2;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.18s, border-color 0.18s, color 0.18s, box-shadow 0.18s, transform 0.15s;
    letter-spacing: 0.3px;
}
.cell-header-join-btn:hover {
    background: rgba(74, 144, 226, 0.28);
    border-color: rgba(74, 144, 226, 0.6);
    box-shadow: 0 0 14px rgba(74, 144, 226, 0.25);
    transform: translateY(-1px);
}
.cell-header-join-btn:active { transform: translateY(0); }
.cell-header-join-btn .material-symbols-outlined { font-size: 15px; }

/* Joined / leave state */
.cell-header-join-btn.is-joined {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.45);
    /* Width is locked via JS (requestAnimationFrame + getBoundingClientRect)
       so the button never shrinks when the label swaps to the shorter "Leave" */
    justify-content: center;
}
.cell-header-join-btn.is-joined:hover {
    background: rgba(245, 108, 108, 0.1);
    border-color: rgba(245, 108, 108, 0.3);
    color: #f56c6c;
    box-shadow: 0 0 14px rgba(245, 108, 108, 0.12);
}
.cell-header-join-btn.is-pending {
    background: rgba(255, 193, 7, 0.08);
    border-color: rgba(255, 193, 7, 0.2);
    color: rgba(255, 193, 7, 0.7);
    cursor: not-allowed;
    opacity: 0.8;
}

/* Loading skeleton state */
.cell-header-bar.is-loading .cell-header-name,
.cell-header-bar.is-loading .cell-header-desc,
.cell-header-bar.is-loading .cell-header-stat-value,
.cell-header-bar.is-loading .cell-header-founder,
.cell-header-bar.is-loading .cell-header-privacy-badge {
    background: rgba(255,255,255,0.07);
    color: transparent;
    border-radius: 4px;
    border-color: transparent;
    animation: skeletonPulse 1.5s ease-in-out infinite;
}
@keyframes skeletonPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

/* Responsive: stack vertically on small screens */
@media (max-width: 900px) {
    .cell-header-bar {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px 14px;
    }
    .cell-header-identity {
        padding-right: 0;
        border-right: none;
        flex: 1 1 100%;
    }
    .cell-header-stats {
        padding: 0;
        border-top: 1px solid rgba(255,255,255,0.07);
        padding-top: 10px;
        flex: 1 1 auto;
    }
    .cell-header-actions {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid rgba(255,255,255,0.07);
        padding-top: 10px;
        width: 100%;
    }
    .cell-header-join-btn { width: 100%; justify-content: center; }
}

/* ============================================================
   CELL POST COMPOSER
   ============================================================ */

.cell-post-composer {
    background: rgba(15, 17, 26, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    overflow: hidden;
    transition: border-color 0.2s;
}
.cell-post-composer:focus-within {
    border-color: rgba(74, 144, 226, 0.3);
}

.cell-composer-prompt {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
}
.cell-composer-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
}
.cell-composer-placeholder {
    flex: 1;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 7px 14px;
    cursor: text;
    transition: border-color 0.2s;
}
.cell-composer-placeholder:hover {
    border-color: rgba(255, 255, 255, 0.18);
}
.cell-composer-type-btns {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}
.cell-composer-type-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.cell-composer-type-btn:hover {
    background: rgba(74, 144, 226, 0.12);
    color: #4a90e2;
}
.cell-composer-type-btn .material-symbols-outlined { font-size: 18px; }

.cell-composer-expanded {
    padding: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.cell-composer-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 10px;
    flex-wrap: wrap;
}
.cell-composer-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.cell-composer-tab .material-symbols-outlined { font-size: 15px; }
.cell-composer-tab.active,
.cell-composer-tab:hover {
    background: rgba(74, 144, 226, 0.12);
    border-color: rgba(74, 144, 226, 0.3);
    color: #4a90e2;
}

.cell-post-title-input {
    width: 100%;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    padding: 9px 12px;
    margin-bottom: 10px;
    transition: border-color 0.2s;
    outline: none;
}
.cell-post-title-input:focus {
    border-color: rgba(74, 144, 226, 0.5);
}
.cell-post-title-input::placeholder { color: rgba(255, 255, 255, 0.25); }

.cell-composer-panel {
    margin-bottom: 12px;
}

.cell-post-content-textarea {
    width: 100%;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.875rem;
    line-height: 1.55;
    padding: 10px 12px;
    resize: vertical;
    min-height: 100px;
    outline: none;
    transition: border-color 0.2s;
}
.cell-post-content-textarea:focus { border-color: rgba(74, 144, 226, 0.5); }
.cell-post-content-textarea::placeholder { color: rgba(255, 255, 255, 0.25); }

.cell-image-upload-area {
    border: 2px dashed rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
    overflow: hidden;
}
.cell-image-upload-area:hover,
.cell-image-upload-area.dragover {
    border-color: rgba(74, 144, 226, 0.5);
    background: rgba(74, 144, 226, 0.05);
}
.cell-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.85rem;
    text-align: center;
    padding: 20px;
}
.cell-upload-placeholder .material-symbols-outlined { font-size: 36px; }
.cell-image-preview {
    width: 100%;
    max-height: 280px;
    object-fit: contain;
}

.cell-link-url-input {
    width: 100%;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.875rem;
    padding: 9px 12px;
    outline: none;
    transition: border-color 0.2s;
}
.cell-link-url-input:focus { border-color: rgba(74, 144, 226, 0.5); }

.cell-link-preview-card {
    margin-top: 8px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}
.cell-link-preview-domain {
    color: #4a90e2;
    font-size: 0.78rem;
}

.cell-video-preview-card {
    position: relative;
    margin-top: 8px;
    border-radius: 6px;
    overflow: hidden;
    max-height: 180px;
}
.cell-video-thumb {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    display: block;
}
.cell-video-provider-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 2px 7px;
    border-radius: 3px;
}

.cell-composer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 4px;
}
.cell-composer-cancel-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.5);
    padding: 7px 16px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.cell-composer-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
}
.cell-composer-submit-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #4a90e2;
    border: none;
    border-radius: 6px;
    color: #fff;
    padding: 7px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
}
.cell-composer-submit-btn:hover {
    background: #5a9fef;
    box-shadow: 0 0 12px rgba(74, 144, 226, 0.35);
}
.cell-composer-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.cell-composer-submit-btn .material-symbols-outlined { font-size: 16px; }

/* ============================================================
   CELL FEED POST CARDS
   ============================================================ */

.cell-feed-posts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cell-feed-empty {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.88rem;
    font-style: italic;
    letter-spacing: 0.5px;
}

.cell-post-card {
    background: rgba(15, 17, 26, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    overflow: hidden;
    transition: border-color 0.2s, transform 0.15s;
    animation: cardEntrance 0.35s ease forwards;
    opacity: 0;
}
.cell-post-card:hover {
    border-color: rgba(74, 144, 226, 0.2);
    transform: translateY(-1px);
}

.cell-post-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px 8px;
}
.cell-post-card-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.cell-post-card-author-block {
    flex: 1;
    min-width: 0;
}
.cell-post-card-author {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cell-post-card-time {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
}
.cell-post-type-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    padding: 2px 7px;
}
.cell-post-type-badge .material-symbols-outlined { font-size: 12px; }

.cell-post-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
    padding: 0 14px 8px;
    margin: 0;
    line-height: 1.4;
}

.cell-post-card-body {
    padding: 0 14px 10px;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.cell-post-card-image-container {
    width: 100%;
    max-height: 480px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
}
.cell-post-card-image {
    width: 100%;
    max-height: 480px;
    object-fit: contain;
    display: block;
}

.cell-post-video-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #000;
}
.cell-post-video-embed iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

.cell-post-card-link {
    margin: 0 14px 10px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #4a90e2;
    font-size: 0.82rem;
    transition: background 0.15s;
}
.cell-post-card-link:hover { background: rgba(74, 144, 226, 0.08); }
.cell-post-card-link .material-symbols-outlined { font-size: 14px; flex-shrink: 0; }
.cell-post-card-link-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cell-post-card-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.cell-post-action-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: none;
    border: none;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.cell-post-action-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.8);
}
.cell-post-action-btn .material-symbols-outlined { font-size: 16px; }

.cell-post-action-btn.is-liked {
    color: #ff6b35;
}
.cell-post-action-btn.is-liked .material-symbols-outlined {
    font-variation-settings: 'FILL' 1;
}

@keyframes cellLikePop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.35); }
    70%  { transform: scale(0.9); }
    100% { transform: scale(1); }
}
.cell-post-action-btn.like-animate {
    animation: cellLikePop 0.35s ease forwards;
}

/* Expandable comment section */
.cell-post-comments-section {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 10px 14px 14px;
    display: none;
}
.cell-post-comments-section.is-open { display: block; }

.cell-comment-item {
    display: flex;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    animation: cardEntrance 0.25s ease forwards;
    opacity: 0;
    align-items: flex-start;
}
.cell-comment-item:last-child { border-bottom: none; }

/* Delete button — only shown on hover of the comment row */
.cell-comment-delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.18);
    padding: 2px 4px;
    border-radius: 4px;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 2px;
    transition: color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
    opacity: 0;
    line-height: 1;
}
.cell-comment-item:hover .cell-comment-delete-btn { opacity: 1; }
.cell-comment-delete-btn:hover {
    color: #f56c6c;
    background: rgba(245, 108, 108, 0.1);
}
.cell-comment-delete-btn .material-symbols-outlined { font-size: 14px; }
.cell-comment-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.cell-comment-body { flex: 1; min-width: 0; }
.cell-comment-author {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
}
.cell-comment-time {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.3);
    margin-left: 6px;
}
.cell-comment-text {
    font-size: 0.83rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.5;
    word-break: break-word;
    margin-top: 2px;
}

.cell-comment-input-row {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    align-items: flex-end;
}
.cell-comment-input-row input {
    flex: 1;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.83rem;
    padding: 7px 10px;
    outline: none;
    transition: border-color 0.2s;
}
.cell-comment-input-row input:focus { border-color: rgba(74, 144, 226, 0.4); }
.cell-comment-input-row input::placeholder { color: rgba(255, 255, 255, 0.25); }
.cell-comment-submit-btn {
    display: flex;
    align-items: center;
    background: rgba(74, 144, 226, 0.15);
    border: 1px solid rgba(74, 144, 226, 0.25);
    border-radius: 6px;
    color: #4a90e2;
    padding: 7px 10px;
    cursor: pointer;
    transition: background 0.15s;
}
.cell-comment-submit-btn:hover { background: rgba(74, 144, 226, 0.25); }
.cell-comment-submit-btn .material-symbols-outlined { font-size: 16px; }

.cell-comments-empty {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.25);
    font-style: italic;
    text-align: center;
    padding: 12px 0;
}

/* Skeleton loading */
.cell-post-skeleton {
    background: rgba(15, 17, 26, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 14px;
    pointer-events: none;
}
.cell-skeleton-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.cell-skeleton-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
}
.cell-skeleton-line {
    height: 10px;
    border-radius: 4px;
    margin-bottom: 6px;
}
.cell-skeleton-line.wide  { width: 55%; }
.cell-skeleton-line.short { width: 30%; }
.cell-skeleton-body       { height: 60px; border-radius: 6px; margin-bottom: 12px; }

@media (max-width: 768px) {
    .cell-composer-tabs { flex-wrap: wrap; }
    .cell-post-card-image-container { max-height: 280px; }
    .cell-post-card-image { max-height: 280px; }
}

/* ============================================================
   CELL CHAT SIDEBAR — Right panel replaces info sidebar in cell view
   ============================================================ */

/* Hub info sidebar becomes a flex column in cell mode */
#hub-info-sidebar.cell-mode {
    position: sticky;
    top: 120px;
    height: calc(100vh - 140px);
    max-height: calc(100vh - 140px);
    overflow: hidden;   /* clip to viewport height — inner panels scroll themselves */
    display: flex;
    flex-direction: column;
    padding: 0;
}

/* The cell chat panel itself — full-height flex column */
#cell-chat-sidebar {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    background: rgba(15, 17, 26, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    overflow: hidden;
}

/* Header bar */
.cell-chat-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.15);
}
.cell-chat-sidebar-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
}
.cell-chat-sidebar-title .material-symbols-outlined {
    font-size: 15px;
    color: #4a90e2;
}

/* Live indicator */
.cell-chat-online-count {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.5px;
}
.cell-chat-online-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4caf50;
    flex-shrink: 0;
    box-shadow: 0 0 6px rgba(76, 175, 80, 0.7);
    animation: chatDotPulse 2.2s ease-in-out infinite;
}
@keyframes chatDotPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(76, 175, 80, 0.7); }
    50%       { opacity: 0.55; box-shadow: 0 0 12px rgba(76, 175, 80, 0.4); }
}

/* Messages scroll area — flex: 1 fills remaining height */
.cell-chat-window {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 12px;
    min-height: 0;
    scroll-behavior: smooth;
}
.cell-chat-window::-webkit-scrollbar { width: 3px; }
.cell-chat-window::-webkit-scrollbar-track { background: transparent; }
.cell-chat-window::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}
.cell-chat-window::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Typing indicator — flush to input */
#cell-chat-sidebar .typing-indicator {
    padding: 0 12px 2px;
    flex-shrink: 0;
    min-height: 0;
}

/* Input area — always at bottom */
.cell-chat-input-area {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    flex-shrink: 0;
    padding: 8px;
    background: rgba(0, 0, 0, 0.1);
}

/* On tablet/mobile (≤1200px): sidebar is normally hidden.
   In cell mode, force-show the chat panel below the feed as a full-width block. */
@media (max-width: 1200px) {
    #hub-info-sidebar.cell-mode {
        display: block !important;
        position: static;
        height: 400px;
        max-height: 400px;
        overflow: hidden;
        grid-column: 1 / -1;
        margin-top: 16px;
        width: 100%;
        padding: 0;
    }
    #cell-chat-sidebar {
        height: 400px;
        border-radius: 8px;
    }
}

/* ============================================================
   CELL OWNER FLOW — Header bar owner badge & improved button
   ============================================================ */

/* Owner name in stats strip */
.cell-header-owner-name {
    color: #b08df5;
}

/* "Leave Cell" destructive variant of the join button */
.cell-header-join-btn.is-owner {
    background: rgba(255, 107, 53, 0.08);
    border-color: rgba(255, 107, 53, 0.25);
    color: rgba(255, 107, 53, 0.7);
}
.cell-header-join-btn.is-owner:hover {
    background: rgba(255, 107, 53, 0.18);
    border-color: rgba(255, 107, 53, 0.55);
    color: #ff6b35;
}

/* ============================================================
   CELL OWNERSHIP TRANSFER MODAL
   ============================================================ */

/* Overlay */
.cell-transfer-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: modalFadeIn 0.22s ease forwards;
}
@keyframes modalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Modal card */
.cell-transfer-modal {
    background: rgba(14, 16, 25, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(176, 141, 245, 0.08);
    animation: modalSlideUp 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes modalSlideUp {
    from { transform: translateY(30px) scale(0.97); opacity: 0; }
    to   { transform: translateY(0)    scale(1);    opacity: 1; }
}

/* Header */
.cell-transfer-modal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    flex-shrink: 0;
}
.cell-transfer-modal-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(176, 141, 245, 0.12);
    border: 1px solid rgba(176, 141, 245, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cell-transfer-modal-icon .material-symbols-outlined {
    font-size: 22px;
    color: #b08df5;
}
.cell-transfer-modal-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 2px;
}
.cell-transfer-modal-subtitle {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.4);
    margin: 0;
}
.cell-transfer-modal-close {
    margin-left: auto;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.cell-transfer-modal-close:hover {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
}
.cell-transfer-modal-close .material-symbols-outlined { font-size: 20px; }

/* Warning notice */
.cell-transfer-warning {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 16px 20px 4px;
    background: rgba(255, 193, 7, 0.07);
    border: 1px solid rgba(255, 193, 7, 0.18);
    border-radius: 8px;
    padding: 12px 14px;
    flex-shrink: 0;
}
.cell-transfer-warning .material-symbols-outlined {
    font-size: 18px;
    color: rgba(255, 193, 7, 0.75);
    margin-top: 1px;
    flex-shrink: 0;
}
.cell-transfer-warning p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.5;
    margin: 0;
}
.cell-transfer-warning strong { color: rgba(255, 193, 7, 0.85); }
.cell-transfer-warning em    { color: rgba(255, 255, 255, 0.4); font-style: normal; }

/* Search input */
.cell-transfer-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 14px 20px 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 8px 12px;
    flex-shrink: 0;
    transition: border-color 0.2s;
}
.cell-transfer-search-wrap:focus-within {
    border-color: rgba(176, 141, 245, 0.35);
}
.cell-transfer-search-wrap .material-symbols-outlined {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.25);
    flex-shrink: 0;
}
.cell-transfer-search {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
}
.cell-transfer-search::placeholder { color: rgba(255, 255, 255, 0.2); }

/* Member list */
.cell-transfer-member-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 12px 8px;
    min-height: 120px;
    max-height: 260px;
}
.cell-transfer-member-list::-webkit-scrollbar { width: 4px; }
.cell-transfer-member-list::-webkit-scrollbar-track { background: transparent; }
.cell-transfer-member-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }

/* Loading state */
.cell-transfer-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 8px;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.83rem;
}
.cell-transfer-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-top-color: #b08df5;
    border-radius: 50%;
    animation: transferSpin 0.8s linear infinite;
    flex-shrink: 0;
}
@keyframes transferSpin {
    to { transform: rotate(360deg); }
}

/* Empty state */
.cell-transfer-empty {
    padding: 24px 8px;
    text-align: center;
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.82rem;
}

/* Individual member row */
.cell-transfer-member-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    border: 1px solid transparent;
    margin-bottom: 3px;
    position: relative;
}
.cell-transfer-member-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.06);
}
.cell-transfer-member-item.is-selected {
    background: rgba(176, 141, 245, 0.1);
    border-color: rgba(176, 141, 245, 0.3);
}
.cell-transfer-member-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}
.cell-transfer-member-info {
    flex: 1;
    min-width: 0;
}
.cell-transfer-member-name {
    font-size: 0.87rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cell-transfer-member-tag {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 1px;
}
/* Selected checkmark */
.cell-transfer-member-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(176, 141, 245, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
}
.cell-transfer-member-item.is-selected .cell-transfer-member-check {
    background: #b08df5;
    border-color: #b08df5;
}
.cell-transfer-member-check .material-symbols-outlined {
    font-size: 14px;
    color: transparent;
    transition: color 0.15s;
}
.cell-transfer-member-item.is-selected .cell-transfer-member-check .material-symbols-outlined {
    color: #fff;
}

/* Selected preview bar */
.cell-transfer-selected-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 20px 0;
    background: rgba(176, 141, 245, 0.07);
    border: 1px solid rgba(176, 141, 245, 0.2);
    border-radius: 8px;
    padding: 10px 14px;
    flex-shrink: 0;
    animation: modalFadeIn 0.2s ease;
}
.cell-transfer-selected-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255,255,255,0.08);
    flex-shrink: 0;
}
.cell-transfer-selected-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #b08df5;
}
.cell-transfer-selected-label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.3);
    margin-left: 2px;
}

/* Action buttons */
.cell-transfer-modal-actions {
    display: flex;
    gap: 10px;
    padding: 16px 20px 20px;
    flex-shrink: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.cell-transfer-cancel-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 10px 0;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.cell-transfer-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
}
.cell-transfer-confirm-btn {
    flex: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(176, 141, 245, 0.15);
    border: 1px solid rgba(176, 141, 245, 0.35);
    border-radius: 8px;
    color: #b08df5;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 10px 0;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s, opacity 0.15s;
}
.cell-transfer-confirm-btn:not(:disabled):hover {
    background: rgba(176, 141, 245, 0.28);
    border-color: rgba(176, 141, 245, 0.6);
    color: #d4b8ff;
}
.cell-transfer-confirm-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.cell-transfer-confirm-btn.is-loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}
.cell-transfer-confirm-btn .material-symbols-outlined { font-size: 18px; }

@media (max-width: 520px) {
    .cell-transfer-modal { max-height: 100vh; border-radius: 0; }
    .cell-transfer-modal-overlay { padding: 0; align-items: flex-end; }
    @keyframes modalSlideUp {
        from { transform: translateY(100%); opacity: 1; }
        to   { transform: translateY(0);    opacity: 1; }
    }
}

/* Account lifecycle: deleted-user author presentation */
.author-deleted-user,
.post-meta-author.author-deleted-user,
.comment-author.author-deleted-user,
.chatter-author-name.author-deleted-user,
.cell-post-card-author.author-deleted-user,
.cell-comment-author.author-deleted-user {
    color: #e85d5d !important;
}