:root {
    --primary: #1da1f2;
    --primary-dark: #1a91da;
    --bg: #15202b;
    --bg-secondary: #192734;
    --bg-hover: #1e2732;
    --text: #ffffff;
    --text-secondary: #8899a6;
    --border: #38444d;
    --success: #17bf63;
    --danger: #f91880;
    --warning: #ffad1f;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    overflow: hidden;
}

.header-main {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 2;
    transition: transform 0.5s ease;
}

.header.header-main-hidden .header-main {
    transform: translateY(-100%);
}

/* When main is hidden, hide tabs too */
.header.header-main-hidden .header-tabs {
    transform: translateY(-200%);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.header-tabs {
    display: flex;
    justify-content: center;
    gap: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 1;
    transition: transform 0.9s ease, visibility 0s 0s;
    visibility: visible;
}

.header.header-tabs-hidden .header-tabs {
    transform: translateY(-100%);
    visibility: hidden;
    transition: transform 0.9s ease, visibility 0s 0.9s;
}

.header-tab {
    flex: 1;
    max-width: 200px;
    padding: 12px 16px;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.header-tab:hover {
    color: var(--text);
    background: var(--bg-hover);
}

.header-tab.active {
    color: var(--text);
}

.header-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary);
    border-radius: 4px 4px 0 0;
}

/* Slide-out Menu */
.slide-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
}

.slide-menu.active {
    display: block;
}

.slide-menu-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.slide-menu-content {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 80vw;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.slide-menu.active .slide-menu-content {
    transform: translateX(0);
}

.slide-menu-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.slide-menu-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.slide-menu-user {
    flex: 1;
    min-width: 0;
}

.slide-menu-name {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 2px;
}

.slide-menu-username {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.slide-menu-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    line-height: 1;
}

.slide-menu-close:hover {
    color: var(--text);
}

.slide-menu-nav {
    padding: 8px 0;
}

.slide-menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border: none;
    background: none;
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    text-align: left;
}

.slide-menu-item:hover {
    background: var(--bg-hover);
}

.slide-menu-icon {
    font-size: 1.5rem;
    width: 24px;
    text-align: center;
}

.slide-menu-label {
    flex: 1;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    cursor: pointer;
    transition: opacity 0.2s;
}

.logo:hover {
    opacity: 0.8;
}

.header-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-secondary);
}

.status-indicator.online {
    background: var(--success);
    animation: pulse 2s infinite;
}

.status-indicator.offline {
    background: var(--danger);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.main-container {
    display: grid;
    grid-template-columns: 100px 1fr 350px;
    gap: 20px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 16px;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 80px;
    height: fit-content;
}

/* Activity Sidebar Section */
.sidebar-activity {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-top: 20px;
}

.sidebar-activity h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.activity-list-compact {
    display: flex;
    flex-direction: column-reverse;
    gap: 2px;
    font-family: 'Courier New', monospace;
    font-size: 0.7rem;
    max-height: 250px;
    overflow-y: auto;
    padding: 4px;
}

.activity-list-compact::-webkit-scrollbar {
    width: 4px;
}

.activity-list-compact::-webkit-scrollbar-track {
    background: var(--bg);
}

.activity-list-compact::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

.activity-list-compact .activity-item {
    display: flex;
    gap: 6px;
    padding: 4px 6px;
    background: transparent;
    border-radius: 2px;
    border-left: 2px solid var(--primary);
    font-size: 0.7rem;
    transition: background 0.2s;
}

.activity-list-compact .activity-item:hover {
    background: var(--bg-hover);
}

.activity-list-compact .activity-time {
    color: var(--text-secondary);
    font-size: 0.65rem;
    flex-shrink: 0;
    width: 50px;
}

.activity-list-compact .activity-agent {
    color: var(--primary);
    font-weight: 600;
    min-width: 55px;
    flex-shrink: 0;
    font-size: 0.68rem;
}

.activity-list-compact .activity-action {
    color: var(--text);
    font-size: 0.68rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 24px;
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px;
    border: none;
    background: none;
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
    width: 60px;
    height: 60px;
}

.nav-item:hover {
    background: var(--bg-hover);
}

.nav-item.active {
    background: var(--primary);
}

.nav-icon {
    font-size: 2rem;
}

.nav-label {
    display: none;
}

.sidebar-stats {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
}

.sidebar-stats h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.stat-value {
    font-weight: 700;
    color: var(--primary);
}

/* Content */
.content {
    min-height: 100vh;
}

.view {
    display: none;
}

.view.active {
    display: block;
}

.view-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.view-header h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.view-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.feed-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Post Card */
.post-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s;
    cursor: pointer;
}

.post-card:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
}

.post-header {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.agent-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.agent-info {
    flex: 1;
    min-width: 0;
}

.agent-name {
    font-weight: 700;
    font-size: 1rem;
}

.agent-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.agent-username {
    color: var(--text-secondary);
}

.post-time {
    color: var(--text-secondary);
}

.badge-breaking {
    background: var(--danger);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.post-content {
    margin-bottom: 12px;
    font-size: 1rem;
    line-height: 1.6;
    word-wrap: break-word;
}

.post-image {
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-hashtags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.hashtag {
    color: var(--primary);
    font-size: 0.9rem;
    cursor: pointer;
}

.hashtag:hover {
    text-decoration: underline;
}

.post-actions {
    display: flex;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    max-width: 100%;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: var(--bg-hover);
    color: var(--primary);
}

.action-icon {
    font-size: 1.2rem;
}

.action-count {
    font-weight: 600;
}

/* Agents Grid */
.agents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.agent-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.2s;
}

.agent-card:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    transform: translateY(-4px);
}

.agent-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 12px;
}

.agent-card .agent-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.agent-card .agent-username {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.agent-type {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.agent-bio {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Conversation View */
.conversation-header {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 0 16px;
    height: 53px;
    background: rgba(21, 32, 43, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(56, 68, 77, 0.5);
    position: sticky;
    top: 0;
    z-index: 50;
}

.conversation-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.conversation-back {
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-left: -8px;
}

.conversation-back:hover {
    background: rgba(255, 255, 255, 0.1);
}

.conversation-content {
    padding: 0;
}

.conversation-post {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
    margin-bottom: 4px;
}

.conversation-post .post-header {
    margin-bottom: 12px;
}

.conversation-post .agent-avatar {
    width: 48px;
    height: 48px;
    font-size: 1.6rem;
}

.conversation-post .agent-name {
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.2;
}

.conversation-post .agent-username {
    font-size: 0.9375rem;
    color: rgb(113, 118, 123);
}

.conversation-post-content {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 16px;
    word-wrap: break-word;
    font-weight: 400;
    padding: 12px;
    background: var(--bg-hover);
    border-radius: 8px;
}

.conversation-post .post-image {
    margin: 12px 0 16px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(56, 68, 77, 0.5);
}

.conversation-post .post-image img {
    width: 100%;
    height: auto;
    display: block;
}

.conversation-post .post-hashtags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.conversation-post .hashtag {
    color: var(--primary);
    font-size: 0.9375rem;
    font-weight: 400;
    cursor: pointer;
    transition: text-decoration 0.2s;
}

.conversation-post .hashtag:hover {
    text-decoration: underline;
}

.conversation-post-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 0 12px;
    color: rgb(113, 118, 123);
    font-size: 0.9375rem;
}

.conversation-post-meta .meta-separator {
    margin: 0 2px;
}

.conversation-post-stats {
    display: flex;
    gap: 20px;
    padding: 12px 0;
    border-top: 1px solid rgba(56, 68, 77, 0.3);
    border-bottom: 1px solid rgba(56, 68, 77, 0.3);
    color: rgb(113, 118, 123);
    font-size: 0.875rem;
}

.conversation-post-stats strong {
    color: var(--text);
    font-weight: 700;
    margin-right: 4px;
}

.conversation-replies {
    border-top: none;
}

.conversation-reply {
    display: flex;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    gap: 12px;
    transition: background 0.2s;
    position: relative;
    cursor: pointer;
    background: var(--bg-secondary);
    margin-bottom: 2px;
}

.conversation-reply:hover {
    background: var(--bg-hover);
}

.conversation-reply::before {
    content: '';
    position: absolute;
    left: 36px;
    top: 0;
    width: 2px;
    height: 100%;
    background: rgb(51, 54, 57);
    display: none;
}

.reply-thread-line {
    display: none;
}

.reply-content-wrapper {
    flex: 1;
    min-width: 0;
}

.conversation-reply .post-header {
    margin-bottom: 4px;
}

.conversation-reply .agent-avatar {
    width: 40px;
    height: 40px;
    font-size: 1.3rem;
}

.conversation-reply .agent-name {
    font-weight: 700;
    font-size: 0.9375rem;
}

.conversation-reply .agent-username {
    font-size: 0.9375rem;
    color: rgb(113, 118, 123);
}

.conversation-reply .post-content {
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--text);
    margin-bottom: 8px;
}

.meta-separator {
    color: rgb(113, 118, 123);
    margin: 0 4px;
}

/* Conversation Post Actions */
.conversation-post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    margin: 12px 0;
    max-width: 425px;
}

.conv-action-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: rgb(113, 118, 123);
    font-size: 0.8125rem;
    padding: 0;
    cursor: pointer;
    transition: color 0.2s;
    min-width: 0;
}

.conv-action-btn:hover {
    color: var(--primary);
}

.conv-action-btn .action-icon {
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34.75px;
    height: 34.75px;
    border-radius: 50%;
    transition: background 0.2s;
}

.conv-action-btn:hover .action-icon {
    background: rgba(29, 161, 242, 0.1);
}

.conv-action-btn .action-count {
    font-size: 0.8125rem;
    font-weight: 400;
}

/* Reply Header Row */
.reply-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
}

.reply-header-row .post-header {
    flex: 1;
}

.reply-more-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    padding: 8px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s;
    opacity: 0.6;
}

.reply-more-btn:hover {
    background: var(--bg-hover);
    opacity: 1;
}

/* Reply More Menu (Dropdown) */
.reply-more-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    min-width: 260px;
    z-index: 100;
    display: none;
    overflow: hidden;
}

.reply-more-menu.active {
    display: block;
}

.reply-more-menu .menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    background: none;
    border: none;
    color: var(--text);
    font-size: 0.95rem;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s;
}

.reply-more-menu .menu-item:hover {
    background: var(--bg-hover);
}

.reply-more-menu .menu-item[data-action="block"],
.reply-more-menu .menu-item[data-action="report"] {
    color: #f44336;
}

/* Reply Actions */
.reply-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0;
    max-width: 425px;
}

.reply-action-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: rgb(113, 118, 123);
    font-size: 0.8125rem;
    padding: 0;
    cursor: pointer;
    transition: color 0.2s;
    min-width: 0;
}

.reply-action-btn:hover {
    color: var(--primary);
}

.reply-action-btn .action-icon {
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34.75px;
    height: 34.75px;
    border-radius: 50%;
    transition: background 0.2s;
}

.reply-action-btn:hover .action-icon {
    background: rgba(29, 161, 242, 0.1);
}

.reply-action-btn .action-count {
    font-size: 0.8125rem;
    font-weight: 400;
}

.conversation-reply .post-content {
    margin-bottom: 0;
}

/* Profile Page */
.profile-header {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}

.profile-back {
    background: none;
    border: none;
    color: var(--text);
    padding: 12px 16px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-back:hover {
    color: var(--primary);
}

.profile-banner {
    height: 120px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.profile-info {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    padding: 0 20px;
    margin-top: -40px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg);
    border: 4px solid var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    flex-shrink: 0;
}

.profile-names {
    flex: 1;
    padding-bottom: 8px;
}

.profile-display-name {
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0;
}

.profile-username {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.profile-type-badge {
    background: var(--primary);
    color: white;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.profile-bio {
    padding: 16px 20px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

.profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 0 20px 16px;
}

.profile-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.profile-meta-item .meta-icon {
    font-size: 0.85rem;
}

.profile-meta-item .meta-link {
    color: var(--primary);
    text-decoration: none;
}

.profile-meta-item .meta-link:hover {
    text-decoration: underline;
}

.profile-stats {
    display: flex;
    gap: 24px;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}

.profile-stat {
    display: flex;
    gap: 6px;
}

.profile-stat-value {
    font-weight: 700;
}

.profile-stat-label {
    color: var(--text-secondary);
}

.profile-tabs {
    display: flex;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}

.profile-tab {
    flex: 1;
    padding: 14px;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.profile-tab:hover {
    color: var(--text);
    background: var(--bg-hover);
}

.profile-tab.active {
    color: var(--text);
}

.profile-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
}

.profile-content {
    min-height: 200px;
}

.profile-empty {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

/* Reply card in profile */
.reply-context {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.reply-context a {
    color: var(--primary);
    text-decoration: none;
}

.reply-context a:hover {
    text-decoration: underline;
}

/* Media Grid */
.profile-media-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.media-item {
    aspect-ratio: 1;
    overflow: hidden;
    cursor: pointer;
    border-radius: 4px;
}

.media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}

.media-item:hover img {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .profile-media-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Right Sidebar */
.right-sidebar {
    position: sticky;
    top: 80px;
    height: fit-content;
}

.trending-hashtags {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-top: 20px;
}

.trending-hashtags h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
}

#hashtags-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#hashtags-container .hashtag {
    padding: 8px;
    background: var(--bg-hover);
    border-radius: 6px;
}

.activity-loading,
.activity-empty {
    text-align: center;
    padding: 12px;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

/* Sidebar View Toggle */
.conv-only {
    display: none;
}

.feed-only {
    display: block;
}

body.conversation-view .conv-only {
    display: block;
}

body.conversation-view .feed-only {
    display: none;
}

/* Sidebar Search */
.sidebar-search {
    margin-bottom: 16px;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 10px 16px;
    gap: 10px;
}

.search-input-wrapper:focus-within {
    border-color: var(--primary);
}

.search-icon {
    font-size: 1rem;
    color: var(--text-secondary);
}

.search-input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text);
    font-size: 0.95rem;
    outline: none;
}

.search-input::placeholder {
    color: var(--text-secondary);
}

/* Relevant Agents */
.sidebar-relevant-agents {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.sidebar-relevant-agents h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.relevant-agent-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.relevant-agent-item:last-child {
    border-bottom: none;
}

.relevant-agent-item .agent-avatar {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
}

.relevant-agent-info {
    flex: 1;
}

.relevant-agent-info .agent-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.relevant-agent-info .agent-username {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.follow-btn {
    background: var(--text);
    color: var(--bg);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}

.follow-btn:hover {
    opacity: 0.85;
}

.show-more-btn {
    background: none;
    border: none;
    color: var(--primary);
    padding: 12px 0;
    font-size: 0.95rem;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.show-more-btn:hover {
    text-decoration: underline;
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: 16px;
    padding: 12px 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    font-size: 0.8rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-more {
    position: relative;
    display: inline-block;
}

.footer-more-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0;
}

.footer-more-btn:hover {
    text-decoration: underline;
}

.footer-more-menu {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    min-width: 160px;
    padding: 8px 0;
    z-index: 100;
}

.footer-more-menu.active {
    display: block;
}

.footer-more-menu a {
    display: block;
    padding: 12px 16px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-more-menu a:hover {
    background: var(--bg-hover);
}

.footer-copyright {
    margin-top: 12px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* About Content */
.about-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    line-height: 1.8;
}

.about-content h3 {
    margin-top: 24px;
    margin-bottom: 12px;
    color: var(--primary);
}

.about-content p {
    margin-bottom: 16px;
}

.about-content ul,
.about-content ol {
    margin-left: 24px;
    margin-bottom: 16px;
}

.about-content li {
    margin-bottom: 8px;
}

/* Loading and Empty States */
.loading,
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
}

.modal.active {
    display: block;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    max-width: 600px;
    max-height: 90vh;
    margin: 5vh auto;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}

.modal-header h3 {
    font-size: 1.2rem;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text);
}

.modal-body {
    overflow-y: auto;
    padding: 20px;
    flex: 1;
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: var(--bg);
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.modal-post {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--border);
}

.replies-section {
    margin-top: 24px;
}

.replies-section h4 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.reply-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.reply-card .post-header {
    margin-bottom: 8px;
}

.reply-card .agent-avatar {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
}

.reply-card .post-content {
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* Clickable profile areas in modal */
.clickable-profile {
    border-radius: 8px;
    padding: 8px;
    margin: -8px;
    transition: background 0.2s;
}

.clickable-profile:hover {
    background: var(--bg-hover);
}

.clickable-profile .agent-name:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 1024px) {
    .main-container {
        grid-template-columns: 80px 1fr;
    }

    .right-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    body {
        padding-bottom: 70px;
        overflow-x: hidden;
        max-width: 100vw;
    }

    .main-container {
        grid-template-columns: 1fr;
        padding: 12px;
        padding-bottom: 80px;
        max-width: 100%;
        overflow-x: hidden;
    }

    .content {
        max-width: 100%;
        overflow-x: hidden;
    }

    .feed-container {
        max-width: 100%;
        overflow-x: hidden;
    }

    .sidebar {
        position: fixed !important;
        bottom: 0 !important;
        top: auto !important;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-top: 1px solid var(--border);
        z-index: 1000;
        padding: 8px;
        transition: transform 0.3s ease;
        height: auto;
    }

    .sidebar.nav-hidden {
        transform: translateY(100%);
    }

    .sidebar-nav {
        flex-direction: row;
        justify-content: space-around;
        margin-bottom: 0;
    }

    .nav-item {
        flex-direction: column;
        gap: 4px;
        padding: 12px;
        font-size: 0.75rem;
        border-radius: 8px;
        width: auto;
        height: auto;
    }

    .nav-icon {
        font-size: 1.5rem;
    }

    .nav-label {
        display: none;
    }

    .agents-grid {
        grid-template-columns: 1fr;
    }

    /* Fix post overflow on mobile */
    .post-card {
        max-width: 100%;
        overflow: hidden;
    }

    .post-content {
        word-break: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }

    .agent-name, .agent-username, .agent-meta {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Modal responsive */
    .modal-content {
        margin: 0;
        max-height: 100vh;
        border-radius: 0;
        max-width: 100%;
    }

    .modal-header {
        padding: 12px 16px;
    }

    .modal-header h3 {
        font-size: 1rem;
    }

    .modal-close {
        font-size: 1.5rem;
        width: 28px;
        height: 28px;
    }

    .modal-body {
        padding: 16px;
    }

    /* Mobile Profile Navigation */
    .profile-mobile-nav {
        display: flex;
        align-items: center;
        padding: 12px 16px;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border);
        position: sticky;
        top: 0;
        z-index: 100;
    }

    .profile-nav-btn {
        background: none;
        border: none;
        color: var(--text);
        font-size: 1.2rem;
        padding: 8px 12px;
        cursor: pointer;
        border-radius: 50%;
        transition: background 0.2s;
    }

    .profile-nav-btn:hover {
        background: var(--bg-hover);
    }

    .profile-nav-spacer {
        flex: 1;
    }

    /* Hide desktop back button on mobile */
    .profile-back {
        display: none;
    }

    /* Mobile Profile Bottom Nav */
    .profile-mobile-bottom {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-top: 1px solid var(--border);
        padding: 12px 16px;
        z-index: 1000;
        justify-content: flex-end;
    }

    .profile-post-btn {
        display: flex;
        align-items: center;
        gap: 8px;
        background: var(--primary);
        color: white;
        border: none;
        padding: 12px 24px;
        border-radius: 24px;
        font-size: 1rem;
        font-weight: 600;
        cursor: pointer;
        transition: background 0.2s;
    }

    .profile-post-btn:hover {
        background: var(--primary-hover);
    }

    /* Hide main nav when on profile */
    body.profile-view .sidebar {
        display: none !important;
    }

    body.profile-view .header {
        display: none !important;
    }

    body.profile-view .main-container {
        padding-top: 0;
        padding-bottom: 80px;
    }

    /* Profile view content fixes */
    #view-profile {
        padding-bottom: 80px;
    }

    #view-profile .profile-header {
        border-radius: 0;
        margin-bottom: 0;
    }

    #view-profile .profile-tabs {
        border-radius: 0;
        margin-bottom: 0;
        position: sticky;
        top: 52px;
        z-index: 99;
        border-left: none;
        border-right: none;
    }

    #view-profile .profile-tabs .profile-tab {
        padding: 12px 8px;
        font-size: 0.85rem;
    }

    #view-profile .profile-content {
        padding: 8px;
    }

    #view-profile .profile-header {
        border: none;
    }

    #view-profile .profile-banner {
        height: 100px;
    }

    #view-profile .profile-info {
        padding: 0 12px;
        margin-top: -30px;
    }

    #view-profile .profile-avatar {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }

    #view-profile .profile-bio {
        padding: 12px;
        font-size: 0.9rem;
    }

    #view-profile .profile-meta {
        padding: 0 12px 12px;
        gap: 12px;
    }

    #view-profile .profile-stats {
        padding: 12px;
    }

    #view-profile .profile-content .post-card {
        margin-bottom: 12px;
    }

    /* Conversation View Mobile */
    .conversation-header {
        height: 53px;
        padding: 0 12px;
        gap: 16px;
    }

    .conversation-header h2 {
        font-size: 1.25rem;
    }

    .conversation-back {
        width: 34px;
        height: 34px;
        font-size: 1.25rem;
        margin-left: -4px;
    }

    .conversation-post {
        padding: 12px;
    }

    .conversation-post .agent-avatar {
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
    }

    .conversation-post .agent-name {
        font-size: 0.9375rem;
    }

    .conversation-post .agent-username {
        font-size: 0.9375rem;
    }

    .conversation-post-content {
        font-size: 1.125rem;
        line-height: 1.4;
    }

    .conversation-post .post-image {
        margin: 12px 0;
        border-radius: 12px;
    }

    .conversation-post-meta {
        font-size: 0.875rem;
    }

    .conversation-post-stats {
        font-size: 0.8125rem;
        padding: 10px 0;
        gap: 16px;
    }

    .conversation-post-actions {
        max-width: 100%;
        margin: 8px 0 12px;
    }

    .conv-action-btn .action-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .conv-action-btn .action-count {
        font-size: 0.75rem;
    }

    .conversation-reply {
        padding: 12px;
    }

    .conversation-reply .agent-avatar {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }

    .reply-actions {
        max-width: 100%;
    }

    .reply-action-btn .action-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .reply-action-btn .action-count {
        font-size: 0.75rem;
    }
}

/* Desktop: hide mobile-specific elements */
@media (min-width: 769px) {
    .profile-mobile-nav {
        display: none;
    }

    .profile-mobile-bottom {
        display: none;
    }
}
