/* General Variables */
:root {
    --primary-color: #1877f2;
    --primary-light: #e7f3ff;
    --secondary-color: #42b72a;
    --text-color: #333;
    --text-secondary: #666;
    --text-tertiary: #8a8d91;
    --secondary-text-color: #666;
    --bg-color: #f0f2f5;
    --card-bg: #fff;
    --border-color: #ddd;
    --border-light: #f0f0f0;
    --hover-color: #f0f0f0;
    --active-color: #e6f0ff;
    --error-color: #ff4d4f;
    --success-color: #52c41a;
    --accent-color: #0084ff;
    --accent-light: #e6f2ff;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 18px;
    --transition: all 0.2s ease;
    --red-danger: #dc3545;
    --blue-primary: #1aadf1;
    --blue-light: #E1F5FE;
    --blue-dark: #0288D1;
}

.dark-mode {
    --primary-color: #4FC3F7;
    --primary-light: #2d4373;
    --secondary-color: #42b72a;
    --text-color: #e4e6eb;
    --text-secondary: #b0b3b8;
    --text-tertiary: #8a8d91;
    --secondary-text-color: #b0b3b8;
    --bg-color: #18191a;
    --navbar-bg-color: #242526;
    --card-bg: #242526;
    --border-color: #3a3b3c;
    --border-light: #2f3031;
    --hover-color: #3a3b3c;
    --active-color: #2d4373;
    --error-color: #ff4d4f;
    --success-color: #52c41a;
    --accent-color: #0084ff;
    --accent-light: #2d4373;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --blue-primary: #4FC3F7;
    --blue-light: rgba(79, 195, 247, 0.15);
    --blue-dark: #29B6F6;
}

/* Body and Global */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f0f2f5 !important;
    color: var(--text-color);
    margin: 0;
    line-height: 1.6;
    padding-top: 70px;
}

/* ===== NAVBAR STYLES - HANDLED BY unified-navbar.css ===== */

/* Navbar styles are now handled by unified-navbar.css */

/* Page Layout */
.page-container {
    display: flex;
    justify-content: center;
    padding: 20px;
    gap: 20px;
    max-width: 1200px;
    margin: 20px auto;
    /* This ensures all columns start from the same top line, preventing overlap */
    align-items: flex-start;
}

.left-sidebar, .right-sidebar {
    flex: 0 0 280px;
    /* This makes the entire column sticky within the viewport on scroll */
    position: -webkit-sticky; /* For Safari compatibility */
    position: sticky;
    top: 80px; /* 60px for the navbar + 20px margin */
    max-height: calc(100vh - 100px); /* Limit height to viewport minus navbar and margin */
    overflow-y: auto; /* Enable vertical scrolling */
    overflow-x: hidden; /* Hide horizontal scroll */
}

/* Custom scrollbar styling for sidebars */
.left-sidebar::-webkit-scrollbar,
.right-sidebar::-webkit-scrollbar {
    width: 6px;
}

.left-sidebar::-webkit-scrollbar-track,
.right-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.left-sidebar::-webkit-scrollbar-thumb,
.right-sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.left-sidebar::-webkit-scrollbar-thumb:hover,
.right-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Firefox scrollbar styling */
.left-sidebar,
.right-sidebar {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

/* Add padding to sidebar content for better scrolling experience */
.left-sidebar .sidebar-card:last-child,
.right-sidebar .sidebar-card:last-child {
    margin-bottom: 20px; /* Extra margin at bottom for better scrolling */
}

.main-content {
    flex-grow: 1;
    max-width: 600px;
}

.sidebar-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sidebar-title {
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--text-color);
    font-size: 1.1rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 6px;
    margin: 0 -10px 5px;
    color: var(--text-color);
    transition: background-color 0.2s;
}

.sidebar-link:hover {
    background-color: var(--hover-color);
}

.sidebar-link i {
    color: var(--blue-primary);
    width: 20px;
    text-align: center;
}

/* Old profile styles removed - now using profile-card-new */

/* Footer Links Styling */
.footer-links {
    padding: 15px 10px !important;
    font-size: 0.75rem;
    color: var(--secondary-text-color);
}

.footer-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.footer-links-container a {
    color: var(--secondary-text-color);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s;
}

.footer-links-container a:hover {
    color: var(--blue-primary);
    text-decoration: underline;
}

.copyright {
    margin-top: 5px;
    color: var(--secondary-text-color);
}

/* Create Post Card */
.create-post-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
}

.create-post-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.create-post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.create-post-input {
    flex-grow: 1;
    padding: 10px 15px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--secondary-text-color);
    cursor: pointer;
    text-align: left;
    font-size: 0.9rem;
    transition: background-color 0.2s;
    outline: none;
    position: relative;
    z-index: 1;
}

.create-post-input:hover {
    background-color: var(--hover-color);
}

/* Prevent button interaction when modal is open */
body.modal-open .create-post-input {
    pointer-events: none;
    opacity: 0.7;
}

body.modal-open .create-post-card {
    pointer-events: none;
    opacity: 0.7;
}

.create-post-actions {
    display: flex;
    justify-content: space-around;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

.post-action-btn {
    background: none;
    border: none;
    color: var(--secondary-text-color);
    font-size: 0.9rem;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-action-btn:hover:not(:disabled) {
    background-color: var(--hover-color);
    color: var(--blue-primary);
}

.post-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.post-action-btn i {
    font-size: 1.1rem;
}

/* Post Styling */
.post {
    background-color: var(--card-bg);
    border-radius: 10px;
    margin-bottom: 20px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    position: relative;
}

.post-author-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    flex-grow: 1;
}

.post-author-link:hover {
    text-decoration: none;
    opacity: 0.9;
}

.post-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

/* Follow button in post header (outside dropdown) */
.follow-post-header-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.1rem;
    padding: 6px 10px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.follow-post-header-btn:hover {
    background-color: var(--hover-color);
    color: var(--primary-color);
}

.follow-post-header-btn.following {
    color: var(--primary-color);
}

.follow-post-header-btn.following:hover {
    background-color: var(--hover-color);
    opacity: 0.8;
}

.post-profile-pic-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.post-author-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 4px;
}

.post-author-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.post-author-name {
    font-size: 0.95rem;
    color: var(--text-color);
    font-weight: 600;
    margin: 0;
}

.post-author-meta-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.post-author-meta {
    color: var(--secondary-text-color);
    font-size: 0.8rem;
}

.post-author-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 2px;
}

/* User type badge in post header - smaller and professional */
.user-type-badge-post {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: capitalize;
    line-height: 1.2;
    letter-spacing: 0.2px;
}

.user-type-badge-post.badge-innovator {
    background-color: rgba(79, 195, 247, 0.12);
    color: #0277BD;
    border: 1px solid rgba(79, 195, 247, 0.2);
}

.user-type-badge-post.badge-investor {
    background-color: rgba(255, 152, 0, 0.12);
    color: #E65100;
    border: 1px solid rgba(255, 152, 0, 0.2);
}

.dark-mode .user-type-badge-post.badge-innovator {
    background-color: rgba(79, 195, 247, 0.2);
    color: #4FC3F7;
    border: 1px solid rgba(79, 195, 247, 0.3);
}

.dark-mode .user-type-badge-post.badge-investor {
    background-color: rgba(255, 152, 0, 0.2);
    color: #FFB74D;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

/* Partner availability badges - smaller and professional */
.partner-badge-post {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.6rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.partner-badge-post i {
    font-size: 0.55rem;
}

.partner-badge-post.looking-for-partners {
    background-color: rgba(66, 183, 42, 0.12);
    color: #2E7D32;
    border: 1px solid rgba(66, 183, 42, 0.2);
}

.partner-badge-post.free-to-use {
    background-color: rgba(33, 150, 243, 0.12);
    color: #1565C0;
    border: 1px solid rgba(33, 150, 243, 0.2);
}

.dark-mode .partner-badge-post.looking-for-partners {
    background-color: rgba(66, 183, 42, 0.2);
    color: #66BB6A;
    border: 1px solid rgba(66, 183, 42, 0.3);
}

.dark-mode .partner-badge-post.free-to-use {
    background-color: rgba(33, 150, 243, 0.2);
    color: #64B5F6;
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.post-content p {
    margin: 10px 0;
    line-height: 1.5;
    word-wrap: break-word;
    color: var(--text-color);
}

.post-media {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
    border-radius: 8px;
    overflow: hidden;
}

.post-media img, .post-media video {
    max-width: 100%;
    height: auto;
    object-fit: cover;
    flex-grow: 1;
}

.post-media.two-items img, .post-media.two-items video {
    width: calc(50% - 2.5px);
}

/* Post Actions - Updated for smaller follow/gift buttons */
.post-actions {
    display: flex;
    justify-content: space-around;
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
    margin-top: 15px;
}

.action-btn {
    background: none;
    border: none;
    color: var(--secondary-text-color);
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-grow: 1;
    justify-content: center;
    transition: all 0.2s;
}

.action-btn:hover {
    background-color: var(--hover-color);
    color: var(--text-color);
}

.action-btn.liked {
    color: var(--blue-primary);
}
.action-btn.reposted {
    color: var(--primary-color);
}



.link-input-group input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.copy-btn {
    padding: 10px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s ease;
}

.copy-btn:hover {
    background: var(--primary-hover);
}

/* Success Toast 
.success-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--success-color);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}
*/
.success-toast.show {
    transform: translateX(0);
}

.success-toast .toast-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.success-toast i {
    font-size: 1.1rem;
}

.success-toast span {
    font-weight: 500;
}


/* Repost Indicator */
.repost-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: var(--primary-color);
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 8px;
    width: fit-content;
}

.repost-indicator i {
    font-size: 0.7rem;
}

.dark-mode .repost-indicator {
    background: var(--primary-color);
}

    
    .success-toast {
        top: 10px;
        right: 10px;
        left: 10px;
        transform: translateY(-100%);
    }
    
    .success-toast.show {
        transform: translateY(0);
    }
    
    .repost-indicator {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
    
    /* Ensure action buttons don't overflow on mobile */
    .post-actions {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .action-btn {
        min-width: auto;
        flex: 1;
        min-width: 60px;
    }
    
/* Follow Button - Icon only */
.follow-btn {
    padding: 8px;
    font-size: 1rem;
    border-radius: 50%;
    background-color: var(--blue-light);
    color: var(--blue-dark);
    border: none;
    transition: all 0.3s ease;
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    /*box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);*/
}

.follow-btn:hover {
    background-color: var(--blue-primary);
    color: white;
    transform: translateY(-2px);
    /*box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);*/
}

.follow-btn.following {
    background-color: var(--blue-primary);
    color: white;
    /*box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);*/
}

.follow-btn.following:hover {
    background-color: #dc3545;
    transform: translateY(-2px);
    /*box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);*/
}

.follow-btn i {
    margin: 0;
    font-size: 0.9rem;
}

/* Gift Button - Smaller and more professional */
.gift-btn {
    padding: 4px 10px;
    font-size: 0.8rem;
    border-radius: 4px;
    background-color: #f6efd8;
    color: #ffab00;
    border: 1px solid #ffd54f;
    transition: all 0.2s;
}

.gift-btn:hover {
    background-color: #ffecb3;
    color: #ff8f00;
}

.dark-mode .gift-btn {
    background-color: rgba(255, 193, 7, 0.15);
    color: #ffd54f;
    border-color: #ffc107;
}

.dark-mode .gift-btn:hover {
    background-color: rgba(255, 193, 7, 0.25);
}

/* Responsive tweaks: make follow/gift buttons more compact on small screens */
@media (max-width: 600px) {
    .follow-btn {
        padding: 6px;
        min-width: 32px;
        height: 32px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    .follow-btn:hover {
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    }

    .follow-btn.following {
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    }

    .follow-btn.following:hover {
        box-shadow: 0 3px 6px rgba(220, 53, 69, 0.3);
    }

    .follow-btn i {
        font-size: 0.8rem;
    }

    .gift-btn {
        padding: 6px 8px;
        font-size: 0.72rem;
        border-radius: 4px;
        line-height: 1;
    }

    .gift-btn i {
        font-size: 0.85rem;
        margin-right: 6px;
    }

    /* If buttons sit inline near the avatar, allow wrapping and remove excess gaps */
    .post-actions, .post-meta, .post-card .post-header {
        flex-wrap: wrap;
        gap: 6px;
    }
}

.post-options-menu {
    position: relative;
    display: inline-block;
}

.post-options-btn {
    background: none;
    border: none;
    color: var(--secondary-text-color);
    font-size: 1.1rem;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.post-options-btn:hover {
    background-color: var(--hover-color);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    min-width: 120px;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: 5px;
}

.dropdown-menu.active {
    display: block;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    font-size: 0.9rem;
    color: var(--text-color);
    transition: background-color 0.2s;
    text-decoration: none;
    border-radius: 6px;
    margin: 4px;
}

.dropdown-menu a:hover {
    background-color: var(--hover-color);
    color: var(--text-color);
}

.dropdown-menu a:first-child {
    margin-top: 0;
}

.dropdown-menu a:last-child {
    margin-bottom: 0;
}

/* Report Modal Styles */
.report-modal {
    max-width: 500px;
    width: 90%;
}

.report-description {
    color: var(--secondary-text-color);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.report-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.report-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: var(--card-bg);
}

.report-option:hover {
    background-color: var(--hover-color);
    border-color: var(--primary-color);
}

.report-option input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.2s ease;
}

.report-option input[type="radio"]:checked + .radio-custom {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
}

.report-option input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: white;
}

.option-content {
    flex: 1;
}

.option-content strong {
    display: block;
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 2px;
}

.option-content span {
    color: var(--secondary-text-color);
    font-size: 0.9rem;
    line-height: 1.4;
}

.report-details {
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
}

.report-details label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.report-details textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--card-bg);
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s ease;
}

.report-details textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.1);
}

.report-details textarea::placeholder {
    color: var(--secondary-text-color);
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.btn-danger:disabled {
    background-color: #6c757d;
    border-color: #6c757d;
    opacity: 0.6;
    cursor: not-allowed;
}

/* Dark mode adjustments for report modal */
.dark-mode .report-option {
    background-color: var(--card-bg);
    border-color: var(--border-color);
}

.dark-mode .report-option:hover {
    background-color: var(--hover-color);
}

.dark-mode .report-details textarea {
    background-color: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-color);
}

/* Mobile responsiveness for report modal */
@media (max-width: 600px) {
    .report-modal {
        width: 95%;
        margin: 10px;
    }
    
    .report-option {
        padding: 10px;
        gap: 10px;
    }
    
    .option-content strong {
        font-size: 0.95rem;
    }
    
    .option-content span {
        font-size: 0.85rem;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Notification Toast Styles 
.notification-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #28a745;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 300px;
}*/

.notification-toast.show {
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast-content i {
    font-size: 1.1rem;
}
/* Light and Dark mode adjustments 
.dark-mode .notification-toast {
    background-color: #28a745;
    color: white;
}*/

.dropdown-menu a i {
    margin-right: 8px;
    color: var(--blue-primary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.empty-state i {
    font-size: 3rem;
    color: var(--border-color);
    margin-bottom: 15px;
}

.empty-state h3 {
    margin: 0 0 10px;
    color: var(--text-color);
}

.empty-state p {
    color: var(--secondary-text-color);
    margin: 0;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow: hidden;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: var(--card-bg);
    margin: 5vh auto;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 680px;
    display: flex;
    flex-direction: column;
    height: 90vh;
    max-height: 800px;
    position: relative;
    z-index: 10000;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-color);
}

.close-btn {
    color: var(--secondary-text-color);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--blue-primary);
}

.modal-body {
    padding: 0 20px;
    overflow-y: auto;
    flex-grow: 1;
}

.modal-footer {
    padding: 10px 20px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

/* Post display inside modal */
.modal-post-container {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.modal-post-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: auto;
}

.modal-post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.modal-post-author strong {
    font-size: 0.95rem;
}

.modal-post-author span {
    color: var(--secondary-text-color);
    font-size: 0.8rem;
    display: block;
}

.modal-post-content p {
    margin: 10px 0;
    line-height: 1.5;
}

/* Comment list and item styling */
.modal-comment-list {
    padding: 20px 0;
}

.comment-item {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}

.comment-content {
    flex-grow: 1;
}

.comment-bubble {
    background-color: var(--bg-color);
    border-radius: 18px;
    padding: 8px 12px;
    display: inline-block;
    max-width: 100%;
}

.comment-bubble strong {
    font-size: 0.9rem;
    display: block;
    margin-bottom: 2px;
}

.comment-bubble p {
    margin: 0;
    font-size: 0.95rem;
    word-wrap: break-word;
}

.comment-actions {
    display: flex;
    gap: 15px;
    padding: 4px 12px;
    font-size: 0.8rem;
    color: var(--secondary-text-color);
}

.comment-actions button {
    background: none;
    border: none;
    color: inherit;
    font-weight: bold;
    padding: 0;
    transition: color 0.2s;
}

.comment-actions button:hover {
    color: var(--blue-primary);
    text-decoration: underline;
}

.comment-actions .comment-like-btn.liked {
    color: var(--blue-primary);
}

.comment-actions .comment-like-count {
    margin-left: 4px;
}

/* Comment edit and delete buttons */
.comment-edit-btn,
.comment-delete-btn {
    background: none;
    border: none;
    color: var(--secondary-text-color);
    font-size: 0.8rem;
    padding: 4px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
    opacity: 0.7;
}

.comment-edit-btn:hover {
    color: var(--blue-primary);
    background-color: var(--hover-bg-color);
    opacity: 1;
}

.comment-delete-btn:hover {
    color: var(--red-danger);
    background-color: var(--hover-bg-color);
    opacity: 1;
}

.comment-edit-btn:disabled,
.comment-delete-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Comment owner badge */
.comment-owner-badge {
    background-color: var(--blue-primary);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    font-weight: 500;
}

/* Comment edit form */
.comment-edit-form {
    margin-top: 8px;
}

.comment-edit-container {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
}

.comment-edit-textarea {
    width: 100%;
    min-height: 60px;
    border: none;
    background: transparent;
    resize: vertical;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-color);
    outline: none;
    margin-bottom: 8px;
}

.comment-edit-textarea::placeholder {
    color: var(--secondary-text-color);
}

.comment-edit-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.comment-edit-actions .btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.comment-edit-actions .btn-secondary {
    background-color: var(--secondary-bg-color);
    color: var(--text-color);
}

.comment-edit-actions .btn-secondary:hover {
    background-color: var(--hover-bg-color);
}

.comment-edit-actions .btn-primary {
    background-color: var(--blue-primary);
    color: white;
}

.comment-edit-actions .btn-primary:hover {
    background-color: var(--blue-hover);
}

.comment-edit-actions .btn-primary:disabled {
    background-color: var(--secondary-text-color);
    cursor: not-allowed;
}

/* Comment header styling */
.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 2px;
}

.comment-header strong {
    font-size: 0.9rem;
    margin-bottom: 0;
}

.comment-replies {
    margin-left: 42px;
    padding-top: 10px;
    border-left: 2px solid var(--border-color);
    padding-left: 10px;
}

/* Comment form styling */
.comment-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-form .comment-avatar {
    width: 32px;
    height: 32px;
}

.comment-input {
    flex-grow: 1;
    border: none;
    background-color: var(--bg-color);
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 0.9rem;
    color: var(--text-color);
    outline: none;
}

.comment-submit-btn {
    background: none;
    border: none;
    color: var(--blue-primary);
    font-size: 1.2rem;
    padding: 5px;
    transition: color 0.2s;
}

.comment-submit-btn:hover {
    color: var(--blue-dark);
}

/* Create Post Modal */
#createPostModal .modal-content {
    max-width: 500px;
}

.create-post-modal #postText {
    width: 100%;
    min-height: 120px;
    border: none;
    background-color: transparent;
    font-size: 1.1rem;
    color: var(--text-color);
    outline: none;
    resize: vertical;
    padding: 5px 0;
    margin-top: 10px;
}

/* Media preview improvements */
.media-preview {
    margin: 15px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
}

.media-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
}

.media-item img,
.media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-media {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
}

/* Post options in modal */
.post-options {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-top: 1px solid var(--border-color);
    margin: 15px 0;
    align-items: center;
}

.option-btn {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.option-btn:hover {
    background-color: var(--hover-color);
}

/* New Contact/Payment Option Styling */
.contact-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 5px;
    margin-bottom: 15px;
    background-color: var(--bg-color);
    border-radius: 6px;
}

.contact-option label {
    font-size: 0.9rem;
    color: var(--secondary-text-color);
    cursor: pointer;
}

/* Character count styling */
.char-count {
    text-align: right;
    font-size: 0.8rem;
    color: var(--secondary-text-color);
    margin: 5px 0 15px 0;
}

/* Login prompt styling */
.login-prompt {
    text-align: center;
    padding: 40px 20px;
}

.login-prompt i {
    font-size: 3rem;
    color: var(--secondary-text-color);
    margin-bottom: 15px;
}

.login-prompt h3 {
    margin: 10px 0;
    color: var(--text-color);
}

.login-prompt p {
    color: var(--secondary-text-color);
    margin-bottom: 20px;
    line-height: 1.5;
}

.login-prompt .btn {
    margin: 10px 0;
}

/* General Button Styling */
.btn {
    display: inline-block;
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    padding: 10px 20px;
    font-size: 0.95rem;
    border-radius: 6px;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
}

.btn-primary {
    color: #fff;
    background-color: var(--blue-primary);
    border-color: var(--blue-primary);
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn:disabled {
    background-color: var(--hover-color);
    border-color: var(--border-color);
    color: var(--secondary-text-color);
    cursor: not-allowed;
    opacity: 0.8;
}

.btn-block {
    display: block;
    width: 100%;
    margin-top: 15px;
}

/* Chat Pop-up - Unified with messaging interface */
.chat-popup {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 380px;
    height: 500px;
    max-height: 80vh;
    background-color: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    z-index: 10001;
    opacity: 1;
    flex-direction: column;
    overflow: hidden;
}

/* Chat header - unified with messaging interface */
.chat-popup .chat-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--card-bg);
    display: flex;
    align-items: center;
    flex-shrink: 0;
    box-shadow: var(--shadow);
    z-index: 5;
}

.chat-popup .chat-header .user-info {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.chat-popup .chat-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: var(--text-color);
}

.chat-popup .chat-header-actions {
    display: flex;
    gap: 12px;
}

.chat-popup .chat-header-actions button {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: var(--transition);
}

.chat-popup .chat-header-actions button:hover {
    background-color: var(--hover-color);
    color: var(--text-color);
}

/* Message area - unified with messaging interface */
.chat-popup .message-area {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(circle at 1px 1px, rgba(0, 0, 0, 0.05) 1px, transparent 0);
    background-size: 20px 20px;
}

/* Scroll to bottom button */
.chat-popup .scroll-to-bottom-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--accent-color);
    color: white;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: var(--shadow-md);
    z-index: 10;
    transition: var(--transition);
}

.chat-popup .scroll-to-bottom-btn:hover {
    background-color: #0066cc;
    transform: scale(1.05);
}

.chat-popup .scroll-to-bottom-btn.show {
    display: flex;
}

/* Message input area - unified with messaging interface */
.chat-popup .message-input-area {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    background-color: var(--card-bg);
    flex-shrink: 0;
}

.chat-popup .input-container {
    display: flex;
    gap: 8px;
    align-items: center;
    width: 100%;
}

.chat-popup .attach-btn {
    background-color: var(--text-tertiary);
    border: none;
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    transition: var(--transition);
    cursor: pointer;
    min-width: 40px;
}

.chat-popup .attach-btn:hover {
    background-color: var(--accent-color);
    transform: scale(1.05);
}

/* Message input - unified with messaging interface */
.chat-popup .message-input-area input[type="text"] {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    font-size: 15px;
    background-color: var(--bg-color);
    color: var(--text-color);
    outline: none;
    transition: var(--transition);
    width: 100%;
}

.chat-popup .message-input-area input[type="text"]:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(0, 132, 255, 0.2);
}

.chat-popup #send-chat-btn {
    background-color: var(--accent-color);
    border: none;
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    transition: var(--transition);
    cursor: pointer;
    min-width: 40px;
}

.chat-popup #send-chat-btn:hover:not(:disabled) {
    background-color: #0066cc;
    transform: scale(1.05);
}

.chat-popup #send-chat-btn:disabled {
    background-color: var(--border-color);
    cursor: not-allowed;
    transform: none;
}

/* Message containers - proper left-right alignment */
.chat-popup .message-container {
    display: flex;
    align-items: flex-end;
    margin: 8px 0;
    width: 100%;
    gap: 8px;
}

.chat-popup .sent-container {
    justify-content: flex-end;
    flex-direction: row-reverse;
}

.chat-popup .received-container {
    justify-content: flex-start;
    flex-direction: row;
}

/* Message avatars */
.chat-popup .message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--border-light);
}

.chat-popup .message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Message bubbles - unified with messaging interface */
.chat-popup .message-bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    line-height: 1.4;
    word-wrap: break-word;
    position: relative;
    animation: fadeIn 0.3s ease;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.chat-popup .message-bubble:hover {
    transform: translateY(-1px);
}

.chat-popup .message-bubble.sent {
    background-color:rgb(255, 255, 255);
    color: rgb(15, 14, 14);
    border-bottom-right-radius: 6px;
}

.chat-popup .message-bubble.received {
    background-color: var(--card-bg);
    color: var(--text-color);
    border-bottom-left-radius: 6px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.chat-popup .message-bubble.deleted {
    opacity: 0.6;
    font-style: italic;
    background-color: var(--border-light);
    color: var(--text-secondary);
}

.chat-popup .message-bubble.deleted.sent {
    background-color: var(--border-light);
    color: var(--text-secondary);
}

.chat-popup .message-bubble.edited::after {
    content: " (edited)";
    font-size: 11px;
    opacity: 0.7;
    font-style: italic;
}

/* Message media - unified with messaging interface */
.chat-popup .message-media {
    margin-top: 8px;
    border-radius: var(--radius-md);
    overflow: hidden;
    max-width: 300px;
}

.chat-popup .message-media img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-md);
}

.chat-popup .message-media video {
    width: 100%;
    max-height: 200px;
    border-radius: var(--radius-md);
}

.chat-popup .message-media .file-attachment {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: var(--bg-color);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.chat-popup .message-media .file-icon {
    font-size: 20px;
    color: var(--accent-color);
}

.chat-popup .message-media .file-info {
    flex-grow: 1;
}

.chat-popup .message-media .file-name {
    font-weight: 500;
    font-size: 13px;
    color: var(--text-color);
}

.chat-popup .message-media .file-size {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Media preview - unified with messaging interface */
.chat-popup .media-preview {
    margin-top: 12px;
    padding: 12px;
    background-color: var(--bg-color);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    word-break: break-word;
    overflow-wrap: break-word;
}

.chat-popup .preview-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.chat-popup .preview-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
}

.chat-popup .preview-name {
    font-weight: 500;
    color: var(--text-color);
    font-size: 14px;
}

.chat-popup .preview-size {
    color: var(--text-secondary);
    font-size: 12px;
}

.chat-popup .remove-media-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: var(--transition);
}

.chat-popup .remove-media-btn:hover {
    background-color: var(--hover-color);
    color: var(--error-color);
}

/* Message timestamp - unified with messaging interface */
.chat-popup .message-timestamp {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 4px;
    text-align: right;
}

.chat-popup .message-bubble.received .message-timestamp {
    text-align: left;
    color: var(--text-secondary);
}

/* Message text styling */
.chat-popup .message-text {
    margin-bottom: 4px;
}

.chat-popup .message-text:last-child {
    margin-bottom: 0;
}

/* File type specific colors for document icons */
.chat-popup .file-type-pdf { color: #e74c3c; }
.chat-popup .file-type-doc { color: #2b579a; }
.chat-popup .file-type-docx { color: #2b579a; }
.chat-popup .file-type-txt { color: #666; }
.chat-popup .file-type-zip { color: #f39c12; }
.chat-popup .file-type-xls { color: #27ae60; }
.chat-popup .file-type-ppt { color: #d35400; }

/* File download link styles */
.chat-popup .file-download-link {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 12px;
    padding: 4px 8px;
    border: 1px solid var(--accent-color);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.chat-popup .file-download-link:hover {
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
}

.chat-popup .file-download-link i {
    font-size: 10px;
}

/* New messages indicator */
#new-messages-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
}

.new-messages-indicator {
    background-color: var(--accent-color);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    animation: bounceIn 0.3s ease;
}

.new-messages-indicator:hover {
    background-color: #0066cc;
    transform: scale(1.05);
}

.new-messages-indicator i {
    font-size: 12px;
}

@keyframes bounceIn {
    0% { opacity: 0; transform: translateX(-50%) translateY(20px) scale(0.8); }
    100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

/* Utility classes */
.hidden {
    display: none !important;
}

.chat-popup .hidden {
    display: none !important;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Edit Message Modal - unified with messaging interface */
.edit-message-modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(3px);
}

.edit-message-content {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-md);
    animation: modalFadeIn 0.3s ease;
    overflow: hidden;
    opacity: 1;
    z-index: 1002;
}

.edit-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.edit-message-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
}

.edit-message-body {
    padding: 20px;
}

.edit-message-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.edit-message-form textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    background-color: var(--bg-color);
    color: var(--text-color);
    outline: none;
    resize: vertical;
    font-family: inherit;
}

.edit-message-form textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(0, 132, 255, 0.2);
}

.edit-media-preview {
    padding: 12px;
    background-color: var(--bg-color);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.edit-media-preview img {
    max-width: 200px;
    max-height: 150px;
    border-radius: var(--radius-sm);
}

.edit-message-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.edit-message-actions button {
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.edit-message-actions .cancel-btn {
    background-color: var(--border-color);
    color: var(--text-color);
    border: none;
}

.edit-message-actions .cancel-btn:hover {
    background-color: var(--text-tertiary);
}

.edit-message-actions .save-btn {
    background-color: var(--accent-color);
    color: white;
    border: none;
}

.edit-message-actions .save-btn:hover {
    background-color: #0066cc;
}

.edit-message-actions .save-btn:disabled {
    background-color: var(--border-color);
    cursor: not-allowed;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.95) translateY(-20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Responsive styles for edit modal */
@media (max-width: 480px) {
    .edit-message-content {
        width: 95%;
        margin: 10px;
    }
    
    .edit-message-header {
        padding: 16px;
    }
    
    .edit-message-body {
        padding: 16px;
    }
    
    .edit-message-form textarea {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Style for the emoji picker library */
emoji-picker {
    position: absolute;
    z-index: 1002;
    --background: var(--card-bg);
    --border-color: var(--border-color);
    --text-color: var(--text-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .auth-buttons a.btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

/* Mobile, Tablet, and Minimized Desktop Layout Reordering */
@media (max-width: 1024px) {
    .page-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .left-sidebar, .right-sidebar {
        position: static;
        width: 100%;
        max-width: 680px;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        max-height: none; /* Remove height restriction on mobile */
        overflow-y: visible; /* Allow natural flow on mobile */
    }
    
    .main-content {
        order: 1;
        width: 100%;
        max-width: 680px;
        margin: 0 auto;
    }
    
    /* Desktop/Tablet: Left sidebar goes to bottom */
    .left-sidebar {
        order: 2;
    }
    
    /* Desktop/Tablet: Right sidebar goes to bottom after left */
    .right-sidebar {
        order: 3;
    }
}

/* Minimized Desktop Screens (between 1025px and 1200px) */
@media (min-width: 1025px) and (max-width: 1200px) {
    .page-container {
        max-width: 1100px;
        padding: 20px 15px;
    }
    
    .left-sidebar {
        flex: 0 0 280px;
    }
    
    .main-content {
        max-width: 600px;
    }
    
    .right-sidebar {
        flex: 0 0 280px;
    }
}

/* Mobile and smaller tablets: Reorder elements within sidebars */
@media (max-width: 768px) {
    /* Navbar responsive styles handled by unified-navbar.css */
    
    .auth-buttons {
        gap: 8px;
    }
    
    .auth-buttons a.btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .modal-content {
        height: calc(var(--vh, 1vh) * 100);
        width: 100%;
        margin: 0;
        border-radius: 0;
    }
    
    .create-post-actions {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .post-action-btn {
        flex: 1;
        min-width: 100px;
        justify-content: center;
    }
    
    .create-post-input {
        font-size: 0.8rem;
    }
    
    .footer-links-container {
        justify-content: center;
    }
    
    /* Mobile Layout: Reorder all elements within page container */
    .page-container {
        display: flex;
        flex-direction: column;
    }
    
    /* Mobile order: Profile Card (1), Create Post (2), Mobile Ads (3), Suggestions (4), Premium Notice (5), Innovation (6), Posts (7) */
    .profile-card-new {
        order: 1;
    }
    
    .create-post-card {
        order: 2;
    }
    
    /* Create a horizontal container for ads and suggestions next to post modal */
    .mobile-content-row {
        display: flex;
        flex-direction: column;
        gap: 15px;
        order: 3;
        width: 100%;
        max-width: 680px;
        margin: 0 auto;
    }
    
    .mobile-ads-section {
        order: 1;
        margin-bottom: 0;
    }
    
    .suggestions-card {
        order: 2;
        margin-bottom: 0;
    }
    
    /* Make mobile ads and suggestions more compact */
    .mobile-content-row .sidebar-card {
        padding: 15px;
        margin-bottom: 0;
    }
    
    .mobile-content-row .ads-title,
    .mobile-content-row .suggestions-title {
        font-size: 1rem;
        margin-bottom: 12px;
    }
    
    /* Add visual separation between ads and suggestions on mobile */
    .mobile-content-row .mobile-ads-section {
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 15px;
        margin-bottom: 0;
    }
    
    .mobile-content-row .suggestions-card {
        padding-top: 15px;
        margin-top: 0;
    }
    
    .premium-notice-card {
        order: 4;
    }
    
    .innovation-card {
        order: 5;
    }
    
    .post-feed {
        order: 6;
    }
    
    .footer-links {
        order: 7;
    }
    
    /* Ensure proper spacing between reordered elements */
    .sidebar-card, .create-post-card, .post-feed {
        margin-bottom: 15px;
    }
    
    .sidebar-card:last-child, .create-post-card:last-child, .post-feed:last-child {
        margin-bottom: 0;
    }
}

/* Navbar responsive styles are now handled by unified-navbar.css */
/* ===== IMPROVED POST LAYOUT STYLES ===== */

/* Enhanced Create Post Card */
.create-post-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
}

.create-post-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
}

.create-post-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-light);
}

.create-post-input {
    flex-grow: 1;
    padding: 12px 16px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    color: var(--secondary-text-color);
    cursor: pointer;
    text-align: left;
    font-size: 15px;
    transition: all 0.2s ease;
    outline: none;
    font-family: inherit;
}

.create-post-input:hover {
    background-color: var(--hover-color);
    border-color: var(--blue-primary);
}

.create-post-actions {
    display: flex;
    justify-content: space-around;
    border-top: 1px solid var(--border-light);
    padding-top: 16px;
    margin-top: 16px;
}

.post-action-btn {
    background: none;
    border: none;
    color: var(--secondary-text-color);
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-action-btn:hover:not(:disabled) {
    background-color: var(--hover-color);
    color: var(--blue-primary);
    transform: translateY(-1px);
}

.post-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.post-action-btn i {
    font-size: 18px;
}

/* Enhanced Post Styling */
.post {
    background-color: var(--card-bg);
    border-radius: 12px;
    margin-bottom: 20px;
    padding: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-light);
    transition: box-shadow 0.2s ease;
}

.post:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    position: relative;
}

.post-profile-pic-small {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-light);
}

.post-author-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-author-info strong {
    font-size: 15px;
    color: var(--text-color);
    font-weight: 600;
}

.post-author-info span {
    color: var(--secondary-text-color);
    font-size: 13px;
}

.post-content p {
    margin: 14px 0;
    line-height: 1.5;
    word-wrap: break-word;
    color: var(--text-color);
    font-size: 15px;
}

.post-media {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
    border-radius: 10px;
    overflow: hidden;
}

.post-media img, .post-media video {
    max-width: 100%;
    height: auto;
    object-fit: cover;
    flex-grow: 1;
    border-radius: 8px;
}

.post-media.two-items img, .post-media.two-items video {
    width: calc(50% - 3px);
}

/* Enhanced Post Actions */
.post-actions {
    display: flex;
    justify-content: space-around;
    border-top: 1px solid var(--border-light);
    padding-top: 14px;
    margin-top: 16px;
}

.action-btn {
    background: none;
    border: none;
    color: var(--secondary-text-color);
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-grow: 1;
    justify-content: center;
    transition: all 0.2s ease;
}

/* Contact button without text - make it more compact */
.action-btn.contact-btn {
    padding: 8px 10px;
    min-width: 44px;
}

.action-btn:hover {
    background-color: var(--hover-color);
    color: var(--text-color);
}

.action-btn.liked {
    color: var(--blue-primary);
}

/* Enhanced Create Post Modal */
.create-post-modal .modal-content {
    max-width: 520px;
    border-radius: 14px;
    overflow: hidden;
}

.create-post-modal .modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-light);
}

.create-post-modal .modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.create-post-modal .modal-body {
    padding: 0 24px;
}

.create-post-modal #postText {
    width: 100%;
    min-height: 140px;
    border: none;
    background-color: transparent;
    font-size: 16px;
    color: var(--text-color);
    outline: none;
    resize: vertical;
    padding: 8px 0;
    margin-top: 12px;
    font-family: inherit;
    line-height: 1.5;
}

.create-post-modal #postText::placeholder {
    color: var(--secondary-text-color);
}

.char-count {
    text-align: right;
    font-size: 13px;
    color: var(--secondary-text-color);
    margin: 6px 0 16px 0;
}

.media-preview {
    margin: 16px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.media-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.media-item img,
.media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-media {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.remove-media:hover {
    background: rgba(0, 0, 0, 0.9);
}

.post-options {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--border-light);
    margin: 18px 0;
    align-items: center;
}

.option-btn {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--secondary-text-color);
}

.option-btn:hover {
    background-color: var(--hover-color);
    color: var(--text-color);
    border-color: var(--blue-primary);
}

.contact-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 8px;
    margin-bottom: 18px;
    background-color: var(--bg-color);
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.contact-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--blue-primary);
}

.contact-option label {
    font-size: 14px;
    color: var(--text-color);
    cursor: pointer;
    flex-grow: 1;
}

/* Enhanced Post Button */
#submitPostBtn {
    display: block;
    width: 100%;
    margin-top: 18px;
    padding: 14px;
    background-color: var(--blue-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

#submitPostBtn:hover:not(:disabled) {
    background-color: var(--blue-dark);
    transform: translateY(-1px);
}

#submitPostBtn:disabled {
    background-color: var(--border-color);
    color: var(--secondary-text-color);
    cursor: not-allowed;
    transform: none;
}

/* Enhanced Login Prompt */
.login-prompt {
    text-align: center;
    padding: 40px 24px;
}

.login-prompt i {
    font-size: 48px;
    color: var(--secondary-text-color);
    margin-bottom: 16px;
}

.login-prompt h3 {
    margin: 12px 0;
    color: var(--text-color);
    font-size: 18px;
}

.login-prompt p {
    color: var(--secondary-text-color);
    margin-bottom: 24px;
    line-height: 1.5;
    font-size: 14px;
}

.login-prompt .btn {
    margin: 12px 0;
    padding: 12px 24px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .create-post-card {
        border-radius: 0;
        margin-bottom: 16px;
        padding: 14px;
    }
    
    .post {
        border-radius: 0;
        margin-bottom: 16px;
        padding: 16px;
    }
    
    .create-post-modal .modal-content {
        margin: 0;
        border-radius: 0;
        height: 100vh;
        max-height: 100vh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    
    .create-post-modal .modal-header {
        flex-shrink: 0;
        position: sticky;
        top: 0;
        z-index: 10;
        background: var(--card-bg);
        border-bottom: 1px solid var(--border-color);
    }
    
    .create-post-modal .modal-body {
        flex: 1;
        overflow-y: auto;
        padding: 20px;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    .create-post-modal .modal-footer {
        flex-shrink: 0;
        position: sticky;
        bottom: 0;
        z-index: 10;
        background: var(--card-bg);
        border-top: 1px solid var(--border-color);
        padding: 15px 20px;
    }
    
    /* Ensure post button is always visible */
    #submitPostBtn {
        position: sticky;
        bottom: 0;
        background: var(--blue-primary);
        border: none;
        border-radius: 8px;
        color: white;
        font-weight: 600;
        padding: 14px;
        width: 100%;
        margin: 0;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 15;
    }
    
    #submitPostBtn:hover:not(:disabled) {
        background: var(--blue-dark);
    }
    
    #submitPostBtn:disabled {
        background: var(--border-color);
        color: var(--secondary-text-color);
    }
    
    /* Improve media preview on mobile */
    .media-preview {
        margin: 16px 0;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 8px;
        max-height: 200px;
        overflow-y: auto;
    }
    
    .media-item {
        aspect-ratio: 1;
        border-radius: 8px;
        overflow: hidden;
        position: relative;
    }
    
    .remove-media {
        position: absolute;
        top: 4px;
        right: 4px;
        background: rgba(0, 0, 0, 0.7);
        color: white;
        border: none;
        border-radius: 50%;
        width: 20px;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 12px;
    }
    
    .post-actions {
        padding: 12px 0 0 0;
    }
    
    .action-btn {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    /* Prevent iOS zoom on input focus */
    #postText {
        font-size: 16px;
    }
    
    /* Improve touch targets */
    .option-btn {
        min-height: 44px;
        padding: 12px 16px;
    }
    
    .contact-option {
        padding: 12px 8px;
        margin-bottom: 16px;
    }
    
    .contact-option input[type="checkbox"] {
        width: 20px;
        height: 20px;
        margin-right: 8px;
    }
    
    /* Ensure proper spacing for modal footer */
    .create-post-modal .modal-body {
        padding-bottom: 20px;
    }
    
    /* Better visual feedback for media preview */
    .media-preview:empty::before {
        content: "No media selected";
        display: block;
        text-align: center;
        color: var(--secondary-text-color);
        font-style: italic;
        padding: 20px;
        background: var(--hover-color);
        border-radius: 8px;
        border: 2px dashed var(--border-color);
    }
    
    /* Smooth transitions for modal elements */
    .create-post-modal .modal-content {
        transition: all 0.3s ease;
    }
    
    /* Better focus states for mobile */
    #postText:focus {
        outline: 2px solid var(--blue-primary);
        outline-offset: 2px;
    }
    
    .option-btn:focus {
        outline: 2px solid var(--blue-primary);
        outline-offset: 2px;
    }
    
    /* Ensure media items are properly sized */
    .media-item img,
    .media-item video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 6px;
    }
}
/* Search component styles are now handled by unified-navbar.css */
.admin-badge {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: gold;
    color: #000;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    border: 2px solid #fff;
}
/* ===== ADVERTISEMENT STYLES ===== */
.advertisements-container {
    margin-bottom: 20px;
}

.ad-item {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ad-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.ad-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.ad-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.ad-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ad-item:hover .ad-image img {
    transform: scale(1.05);
}

.ad-content {
    padding: 12px;
}

.ad-content h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: var(--text-color);
    font-weight: 600;
}

.ad-content p {
    margin: 0;
    font-size: 14px;
    color: var(--secondary-text-color);
    line-height: 1.4;
}

/* Mobile specific ad styles */
.mobile-ads-top {
    margin-bottom: 15px;
}

.mobile-ads .ads-header {
    padding: 10px 0;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.mobile-ads .ads-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--text-color);
}

.mobile-ads-scroll {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 10px;
    scrollbar-width: none; /* Firefox */
}

.mobile-ads-scroll::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

.mobile-ads .ad-item {
    flex: 0 0 280px;
    margin-bottom: 0;
}

.mobile-ads .ad-image {
    height: 180px;
}

/* Right sidebar ad adjustments */
.right-sidebar .ad-item {
    margin-bottom: 15px;
}

.right-sidebar .ad-item:last-child {
    margin-bottom: 0;
}

/* Animation for ad rotation */
@keyframes adFade {
    0% { opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; }
}

.ad-item.rotating {
    animation: adFade 20s infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .desktop-ads {
        display: none;
    }
    
    .ad-image {
        height: 160px;
    }
    
    /* Hide right sidebar on mobile */
    .right-sidebar {
        display: none;
    }
    
    /* Show mobile ads section on mobile */
    .mobile-ads-section {
        display: block;
    }
}

/* Desktop styles - hide mobile ads section but keep mobile content row for suggestions */
@media (min-width: 769px) {
    .mobile-ads-section {
        display: none;
    }
    
    /* Keep mobile-content-row visible on desktop for suggestions */
    .mobile-content-row {
        display: flex;
        flex-direction: column;
        gap: 15px;
        margin-bottom: 20px;
    }
    
    /* On desktop, only show suggestions in mobile-content-row, hide ads */
    .mobile-content-row .mobile-ads-section {
        display: none;
    }
    
    .mobile-content-row .suggestions-card {
        display: block;
        order: 1;
        margin-bottom: 0;
        /* Ensure it looks good on desktop */
        max-width: 100%;
        width: 100%;
    }
    
    /* Desktop suggestions styling */
    @media (min-width: 769px) {
        .mobile-content-row .suggestions-card {
            padding: 20px;
            background-color: var(--card-bg);
            border-radius: 10px;
            border: 1px solid var(--border-color);
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
        }
    }
}

@media (min-width: 769px) {
    .mobile-ads-top {
        display: none;
    }
}/* ===== IMPROVED POST LAYOUT STYLES ===== */
/* Enhanced Create Post Card */
/* ===== WIDER LAYOUT STYLES ===== */
/* Update the main container to be wider */
.page-container {
    max-width: 1400px; /* Increased from 1200px */
    padding: 20px 30px; /* Added horizontal padding */
}

/* Make left sidebar slightly wider */
.left-sidebar {
    flex: 0 0 320px; /* Increased from 280px */
}

/* Make main content area significantly wider */
.main-content {
    max-width: 680px; /* Increased from 600px */
    flex-grow: 1;
}

/* Make right sidebar slightly wider */
.right-sidebar {
    flex: 0 0 340px; /* Increased from 280px */
}

/* Navbar padding handled by unified-navbar.css */

/* Ensure content doesn't get too stretched on very large screens */
@media (min-width: 1600px) {
    .page-container {
        max-width: 1500px;
    }
    
    .left-sidebar {
        flex: 0 0 350px;
    }
    
    .main-content {
        max-width: 750px;
    }
    
    .right-sidebar {
        flex: 0 0 350px;
    }
}

/* Adjust for medium screens */
@media (max-width: 1200px) {
    .page-container {
        max-width: 1100px;
    }
    
    .left-sidebar {
        flex: 0 0 280px;
    }
    
    .main-content {
        max-width: 600px;
    }
    
    .right-sidebar {
        flex: 0 0 280px;
    }
}

/* Keep mobile layout as is */
@media (max-width: 1024px) {
    .page-container {
        flex-direction: column;
        max-width: 100%;
    }
    
    .left-sidebar, .right-sidebar {
        flex: 0 0 100%;
        width: 100%;
        max-width: 680px;
        margin: 0 auto 20px;
        max-height: none; /* Remove height restriction on smaller screens */
        overflow-y: visible; /* Allow natural flow */
    }
    
    .main-content {
        max-width: 100%;
        order: 1;
    }
}

/* Additional improvements for the wider layout */
.create-post-card {
    border-radius: 12px;
}

.post {
    border-radius: 12px;
}

.sidebar-card {
    border-radius: 12px;
}

/* Improve ad styling for the wider layout */
.ad-item {
    border-radius: 12px;
}

.ad-content {
    padding: 15px;
}

.ad-content h4 {
    font-size: 17px;
}

.ad-content p {
    font-size: 15px;
}

/* Navbar search styles handled by unified-navbar.css */

/* Adjust the create post modal for wider screens */
#createPostModal .modal-content {
    max-width: 600px;
}

/* Improve the user dropdown positioning */
.user-dropdown-menu {
    right: -10px;
}

/* Better spacing for the three-column layout */
@media (min-width: 1025px) {
    .page-container {
        gap: 25px;
    }
}
/* ===== NOTIFICATION STYLES ===== */
.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.notifications-header h1 {
    margin: 0;
    font-size: 24px;
    color: var(--text-color);
}

.notifications-container {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.notification-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background-color: var(--hover-color);
}

.notification-item.unread {
    background-color: var(--blue-light);
}

.notification-item.unread:hover {
    background-color: #d4edff;
}

.dark-mode .notification-item.unread {
    background-color: rgba(79, 195, 247, 0.15);
}

.notification-avatar {
    margin-right: 15px;
    flex-shrink: 0;
}

.notification-avatar img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
}

.notification-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--blue-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.notification-content {
    flex-grow: 1;
}

.notification-message {
    font-size: 15px;
    color: var(--text-color);
    margin-bottom: 5px;
    line-height: 1.4;
}

.notification-time {
    font-size: 13px;
    color: var(--secondary-text-color);
}

.notification-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .notifications-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .notifications-header h1 {
        font-size: 20px;
    }
    
    .notification-item {
        padding: 12px;
    }
    
    .notification-avatar {
        margin-right: 12px;
    }
    
    .notification-avatar img,
    .notification-icon {
        width: 40px;
        height: 40px;
    }
    
    .notification-message {
        font-size: 14px;
    }
}
/* ===== EDIT POST MODAL STYLES ===== */
#editPostModal .modal-content {
    max-width: 700px;
    border-radius: 14px;
    overflow: hidden;
}
#editPostModal .modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-light);
}
#editPostModal .modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}
#editPostModal .modal-body {
    padding: 24px;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

#editPostText {
    width: 100%;
    min-height: 150px;
    border: 1px solid var(--border-light);
    background-color: var(--bg-color);
    font-size: 16px;
    color: var(--text-color);
    outline: none;
    resize: vertical;
    padding: 12px;
    border-radius: 8px;
    font-family: inherit;
    line-height: 1.5;
    transition: border-color 0.2s;
}
#editPostText:focus {
    border-color: var(--blue-primary);
}
#editPostText::placeholder {
    color: var(--secondary-text-color);
}

/* Character Count */
.char-count {
    text-align: right;
    font-size: 13px;
    color: var(--secondary-text-color);
    margin: 6px 0 0 0;
}

/* Existing Media Section */
.existing-media-section {
    margin: 20px 0;
}
.existing-media-section h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: var(--text-color);
}

.existing-media {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.existing-media-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.existing-media-item:hover {
    transform: translateY(-2px);
}

.media-preview-container {
    position: relative;
    aspect-ratio: 1;
}

.media-preview-container img,
.media-preview-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.2s;
}

.existing-media-item:hover .media-actions {
    opacity: 1;
}

.media-actions .btn {
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 12px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-actions .btn-danger {
    background-color: rgba(220, 53, 69, 0.9);
    color: white;
}

.media-actions .btn-secondary {
    background-color: rgba(108, 117, 125, 0.9);
    color: white;
}

.media-actions .btn:hover {
    transform: scale(1.05);
}

/* New Media Section */
.new-media-section {
    margin: 20px 0;
}
.new-media-section h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: var(--text-color);
}

.media-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.media-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.media-item img,
.media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-new-media {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s;
}

.media-item:hover .remove-new-media {
    opacity: 1;
}

/* No Media Messages */
.no-existing-media {
    text-align: center;
    color: var(--secondary-text-color);
    font-style: italic;
    padding: 20px;
    background-color: var(--hover-color);
    border-radius: 8px;
    margin: 0;
}

/* Post Options */
.post-options {
    display: flex;
    gap: 10px;
    padding: 15px 0;
    border-top: 1px solid var(--border-light);
    margin: 20px 0;
    align-items: center;
}

.option-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background-color: var(--hover-color);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: var(--text-color);
}

.option-btn:hover {
    background-color: var(--blue-primary);
    color: white;
    border-color: var(--blue-primary);
}

/* Contact Option */
.contact-option {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 15px 0;
    padding: 10px;
    background-color: var(--hover-color);
    border-radius: 8px;
}

.contact-option input[type="checkbox"] {
    margin: 0;
}

.contact-option label {
    margin: 0;
    font-size: 14px;
    color: var(--text-color);
    cursor: pointer;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    margin-top: 20px;
}

.modal-actions .btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-secondary {
    background-color: var(--secondary-text-color);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--text-color);
}

.btn-primary {
    background-color: var(--blue-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--blue-dark);
}

.btn-primary:disabled {
    background-color: var(--secondary-text-color);
    cursor: not-allowed;
}

/* Media Preview Styles */
.media-preview-container {
    position: relative;
    display: inline-block;
    margin: 5px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.media-preview-container img,
.media-preview-container video {
    max-width: 150px;
    max-height: 150px;
    width: auto;
    height: auto;
    display: block;
}

.media-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.media-info .filename {
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-info .filesize {
    opacity: 0.8;
}

.existing-media-item {
    display: inline-block;
    margin: 5px;
}

.existing-media-item .media-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.2s;
}

.existing-media-item:hover .media-actions {
    opacity: 1;
}

.existing-media-item .btn {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
}

.media-item.new-media {
    display: inline-block;
    margin: 5px;
}

.media-item.new-media .remove-new-media {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.media-item.new-media .remove-new-media:hover {
    background: rgba(255, 0, 0, 1);
}

.existing-media-section,
.new-media-section {
    margin: 15px 0;
}

.existing-media-section h4,
.new-media-section h4 {
    margin-bottom: 10px;
    color: var(--text-color);
    font-size: 16px;
}

.no-existing-media {
    color: var(--secondary-text-color);
    font-style: italic;
    text-align: center;
    padding: 20px;
    background: var(--hover-color);
    border-radius: 8px;
    border: 2px dashed var(--border-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    #editPostModal .modal-content {
        max-width: 95%;
        margin: 20px auto;
        max-height: 90vh;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
    
    #editPostModal .modal-body {
        padding: 16px;
        overflow-y: auto;
        flex: 1;
    }
    
    .existing-media {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .media-preview {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 8px;
    }
    
    .modal-actions {
        flex-direction: column;
        position: sticky;
        bottom: 0;
        background: var(--card-bg);
        border-top: 1px solid var(--border-color);
        margin: 0 -16px;
        padding: 16px;
    }
    
    .modal-actions .btn {
        width: 100%;
    }
    
    .media-preview-container img,
    .media-preview-container video {
        max-width: 120px;
        max-height: 120px;
    }
    
    .media-info {
        font-size: 10px;
        padding: 6px;
    }
    
    /* Ensure textarea is visible when keyboard opens */
    #editPostText {
        font-size: 16px; /* Prevent zoom on iOS */
        min-height: 120px;
    }
    
    /* Better touch targets for mobile */
    .media-actions .btn {
        min-height: 44px;
        min-width: 44px;
        padding: 12px;
    }
    
    .option-btn {
        min-height: 44px;
        padding: 12px 16px;
    }
    
    /* Improve existing media display on mobile */
    .existing-media-item {
        min-height: 120px;
    }
    
    .existing-media-item img,
    .existing-media-item video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}
/* ===== CHAT MESSAGE STYLES ===== */
.message {
    display: flex;
    margin-bottom: 15px;
    max-width: 80%;
}

.message.incoming {
    align-self: flex-start;
}

.message.outgoing {
    align-self: flex-end;
    flex-direction: row-reverse;
    margin-left: auto;
}

.message-avatar {
    width: 32px;
    height: 32px;
    margin: 0 10px;
    flex-shrink: 0;
}

.message-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.message-content {
    background-color: var(--bg-color);
    border-radius: 18px;
    padding: 10px 15px;
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.message-content-inner {
    flex: 1;
    min-width: 0;
}

.message.incoming .message-content {
    background-color: var(--blue-light);
    border-bottom-left-radius: 4px;
}

.message.outgoing .message-content {
    background-color: var(--blue-primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.message-text {
    margin: 0;
    word-wrap: break-word;
    word-break: break-word;
    line-height: 1.4;
    overflow-wrap: break-word;
}

.message-media {
    margin-top: 8px;
}

.message-media img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    object-fit: contain;
    display: block;
    width: auto;
    height: auto;
}

.message-media video {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    display: block;
    width: auto;
    height: auto;
}

.message-media a {
    color: inherit;
    text-decoration: underline;
    word-break: break-all;
    display: block;
    margin-top: 4px;
}

/* Message actions (ellipsis button + dropdown) - Always visible */
.message {
    position: relative; /* allow absolute positioning of actions */
}





/* Message actions - clean minimalist design */
.chat-popup .message-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: block;
    z-index: 10;
}

.chat-popup .message-bubble.received .message-actions {
    right: auto;
    left: 8px;
}

/* Clean 3-dots menu button - always visible */
.chat-popup .message-menu-btn {
    background: rgba(0, 0, 0, 0.1);
    border: none;
    padding: 6px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 1;
}

.chat-popup .message-menu-btn:hover {
    background-color: rgba(0, 0, 0, 0.15);
    color: var(--text-color);
    opacity: 1;
}

.chat-popup .message-bubble.sent .message-menu-btn {
    color: rgba(0, 13, 255, 0.8);
}
/* Clean dropdown menu - subtle background for visibility */
.chat-popup .message-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 4px;
    z-index: 20;
    min-width: 100px;
    display: none;
}

.chat-popup .message-bubble.received .message-dropdown-menu {
    right: auto;
    left: 0;
}

.chat-popup .message-dropdown-menu.show {
    display: block;
}

/* Clean menu options - visible with subtle backgrounds */
.chat-popup .message-menu-option {
    background: transparent;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    color: var(--text-color);
    font-size: 13px;
    transition: var(--transition);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    text-align: left;
    margin-bottom: 2px;
}

.chat-popup .message-menu-option:hover {
    background-color: var(--hover-color);
    color: var(--text-color);
}

.chat-popup .message-menu-option.edit-option:hover {
    background-color: rgba(0, 132, 255, 0.1);
    color: var(--accent-color);
}

.chat-popup .message-menu-option.delete-option:hover {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--error-color);
}

.chat-popup .message-menu-option i {
    font-size: 12px;
    width: 14px;
}

.message-time {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 5px;
    text-align: right;
}

.no-messages {
    text-align: center;
    color: var(--secondary-text-color);
    padding: 20px;
}

.error-message {
    color: var(--red-danger);
    text-align: center;
    padding: 20px;
}

/* Responsive chat styles - unified with messaging interface */
@media (max-width: 480px) {
    .chat-popup {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
        box-shadow: none;
    }
    
    .chat-popup .chat-header {
        padding: 12px 16px;
    }
    
    .chat-popup .chat-header h3 {
        font-size: 1.1em;
    }
    
    .chat-popup .message-area {
        padding: 16px;
    }
    
    .chat-popup .message-input-area {
        padding: 12px 16px;
    }
    
    .chat-popup .input-container {
        gap: 6px;
    }
    
    .chat-popup .attach-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
        min-width: 36px;
    }
    
    .chat-popup #send-chat-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
        min-width: 36px;
    }
    
    .chat-popup .message-input-area input[type="text"] {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .chat-popup .media-preview {
        margin-top: 8px;
        padding: 8px;
    }
    
    /* Mobile message layout adjustments */
    .chat-popup .message-container {
        margin: 6px 0;
        gap: 6px;
    }
    
    .chat-popup .message-avatar {
        width: 28px;
        height: 28px;
    }
    
    .chat-popup .message-bubble {
        max-width: 80%;
        padding: 10px 14px;
        font-size: 13px;
    }
    
    /* Mobile message actions */
    .chat-popup .message-actions {
        top: 6px;
        right: 6px;
    }
    
    .chat-popup .message-bubble.received .message-actions {
        left: 6px;
    }
    
    .chat-popup .message-menu-btn {
        width: 20px;
        height: 20px;
        font-size: 12px;
        opacity: 0.8;
    }
    
    .chat-popup .message-menu-option {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .chat-popup .message-dropdown-menu {
        min-width: 90px;
        padding: 3px;
    }
}

/* Tablet responsive styles - unified with messaging interface */
@media (max-width: 768px) and (min-width: 481px) {
    .chat-popup {
        width: 90%;
        max-width: 400px;
        height: 80%;
        max-height: 600px;
        bottom: 20px;
        right: 20px;
        border-radius: 12px;
    }
    
    .chat-popup .message-area {
        padding: 15px;
    }
    
    .chat-popup .message-input-area {
        padding: 12px;
    }
    
    .chat-popup .input-container {
        gap: 8px;
    }
    
    .chat-popup .attach-btn {
        width: 38px;
        height: 38px;
        font-size: 15px;
    }
    
    .chat-popup #send-chat-btn {
        width: 38px;
        height: 38px;
        font-size: 15px;
    }
    
    .chat-popup .message-input-area input[type="text"] {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 10px 15px;
    }
    
    /* Tablet message layout adjustments */
    .chat-popup .message-container {
        margin: 7px 0;
        gap: 7px;
    }
    
    .chat-popup .message-avatar {
        width: 30px;
        height: 30px;
    }
    
    .chat-popup .message-bubble {
        max-width: 75%;
        padding: 11px 15px;
        font-size: 13px;
    }
    
    /* Tablet message actions */
    .chat-popup .message-actions {
        top: 7px;
        right: 7px;
    }
    
    .chat-popup .message-bubble.received .message-actions {
        left: 7px;
    }
    
    .chat-popup .message-menu-btn {
        width: 22px;
        height: 22px;
        font-size: 13px;
        opacity: 0.75;
    }
    
    .chat-popup .message-menu-option {
        padding: 7px 11px;
        font-size: 12px;
    }
    
    .chat-popup .message-dropdown-menu {
        min-width: 95px;
        padding: 3px;
    }
}
/* Event item styles for single event display */
.event-item {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.event-image {
    width: 100%;
    height: 160px;
    overflow: hidden;
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-content {
    padding: 15px;
}

.event-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: var(--text-color);
    font-weight: 600;
}

.event-description {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: var(--secondary-text-color);
    line-height: 1.4;
}

.event-details {
    margin-bottom: 15px;
}

.event-detail {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--secondary-text-color);
}

.event-detail i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

.event-rsvp-btn {
    width: 100%;
    padding: 10px;
    background-color: var(--blue-primary);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}

.event-rsvp-btn:hover {
    background-color: var(--blue-dark);
}

.event-past-label {
    text-align: center;
    padding: 10px;
    background-color: var(--bg-color);
    color: var(--secondary-text-color);
    border-radius: 5px;
    font-size: 13px;
}

.events-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.events-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--text-color);
}

.view-all-events {
    font-size: 13px;
    color: var(--blue-primary);
    text-decoration: none;
}

.view-all-events:hover {
    text-decoration: underline;
}
/* Event item styles for single event display */
.event-item {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.event-image {
    width: 100%;
    height: 160px;
    overflow: hidden;
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-content {
    padding: 15px;
}

.event-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: var(--text-color);
    font-weight: 600;
}

.event-description {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: var(--secondary-text-color);
    line-height: 1.4;
}

.event-details {
    margin-bottom: 15px;
}

.event-detail {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--secondary-text-color);
}

.event-detail i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

.event-rsvp-btn {
    width: 100%;
    padding: 10px;
    background-color: var(--blue-primary);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}

.event-rsvp-btn:hover {
    background-color: var(--blue-dark);
}

.event-past-label {
    text-align: center;
    padding: 10px;
    background-color: var(--bg-color);
    color: var(--secondary-text-color);
    border-radius: 5px;
    font-size: 13px;
}

.events-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.events-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--text-color);
}

.view-all-events {
    font-size: 13px;
    color: var(--blue-primary);
    text-decoration: none;
}

.view-all-events:hover {
    text-decoration: underline;
}
/* Responsive event styles */
@media (max-width: 768px) {
    .event-image {
        height: 140px;
    }
    
    .event-title {
        font-size: 15px;
    }
    
    .event-description {
        font-size: 13px;
    }
}
/* ===== SMOOTH PROFESSIONAL LAYOUT STYLES ===== */

/* Update card styles for a more professional look */
.sidebar-card, .create-post-card, .post, .ad-item, .event-item {
    border-radius: 8px; /* Reduced from 10-12px for a more professional look */
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

/* Hover effects for cards */
.sidebar-card:hover, .create-post-card:hover, .post:hover, .ad-item:hover, .event-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* Create post card specific styling */
.create-post-card {
    padding: 16px;
    margin-bottom: 20px;
    background-color: var(--card-bg);
}

/* Post styling */
.post {
    padding: 18px;
    margin-bottom: 20px;
    background-color: var(--card-bg);
}

/* Sidebar card styling */
.sidebar-card {
    padding: 20px;
    margin-bottom: 20px;
    background-color: var(--card-bg);
}

/* Advertisement styling */
.ad-item {
    overflow: hidden;
    margin-bottom: 15px;
    background-color: var(--card-bg);
}

.ad-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.ad-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.ad-item:hover .ad-image img {
    transform: scale(1.03);
}

.ad-content {
    padding: 15px;
}

.ad-content h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: var(--text-color);
    font-weight: 600;
}

.ad-content p {
    margin: 0;
    font-size: 14px;
    color: var(--secondary-text-color);
    line-height: 1.4;
}

/* Event item styling */
.event-item {
    overflow: hidden;
    margin-bottom: 15px;
    background-color: var(--card-bg);
}

.event-image {
    width: 100%;
    height: 160px;
    overflow: hidden;
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.event-item:hover .event-image img {
    transform: scale(1.03);
}

.event-content {
    padding: 15px;
}

.event-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: var(--text-color);
    font-weight: 600;
}

.event-description {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: var(--secondary-text-color);
    line-height: 1.4;
}

/* Ad rotation animation */
@keyframes subtlePulse {
    0% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
    100% { transform: translateY(0); }
}

.ad-rotating, .event-rotating {
    animation: subtlePulse 2s ease-in-out infinite;
}

/* Mobile ad carousel */
.mobile-ads-scroll {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 10px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.mobile-ads-scroll::-webkit-scrollbar {
    display: none;
}

.mobile-ads .ad-item {
    flex: 0 0 280px;
    margin-bottom: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar-card, .create-post-card, .post, .ad-item, .event-item {
        border-radius: 6px;
    }
    
    .create-post-card, .post {
        padding: 14px;
    }
    
    .sidebar-card {
        padding: 16px;
    }
}

.post-actions {
    display: flex;
    justify-content: space-between;
    padding: 12px 0 0 0;
    border-top: 1px solid var(--border-light);
}

/* ===== NEW RIGHT SIDEBAR CARDS STYLES ===== */
/* Ads Card Design */
.ads-card {
    padding: 20px;
    background-color: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
}

.ads-title {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
}

.ads-container {
    position: relative;
    overflow: hidden;
}

.ad-item {
    display: none;
    transition: opacity 0.5s ease-in-out;
    margin-bottom: 0;
    border-radius: 10px;
    overflow: hidden;
    background-color: var(--card-bg);
    border: 1px solid var(--border-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ad-item.active {
    display: block;
}

.ad-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease;
}

.ad-link:hover {
    transform: translateY(-2px);
}

.ad-image {
    width: 100%;
    min-height: 150px;
    max-height: 300px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    background-color: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.ad-image img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    transition: transform 0.3s ease, opacity 0.3s ease;
    border-radius: 6px;
    background-color: var(--bg-color);
}

/* Loading state for ad images */
.ad-image img[src=""] {
    opacity: 0;
}

.ad-image img:not([src=""]) {
    opacity: 1;
}

/* Aspect ratio preservation for different image types */
.ad-image.aspect-square img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.ad-image.aspect-landscape img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.ad-image.aspect-portrait img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.ad-link:hover .ad-image img {
    transform: scale(1.05);
}

.ad-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-color);
    color: var(--secondary-text-color);
    font-size: 14px;
    border: 2px dashed var(--border-color);
}

.ad-content {
    padding: 0 5px;
}

.ad-title {
    margin: 0 0 6px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.3;
}

.ad-description {
    margin: 0;
    font-size: 12px;
    color: var(--secondary-text-color);
    line-height: 1.4;
}

/* Ads Contact Footer */
.ads-contact-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-light);
    text-align: center;
}

.ads-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.ads-contact-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.ads-contact-link:active {
    transform: translateY(0);
}

.contact-icon {
    font-size: 14px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.ads-contact-link span {
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Responsive styling for ads contact footer */
@media (max-width: 768px) {
    .ads-contact-footer {
        margin-top: 12px;
        padding-top: 12px;
    }
    
    .ads-contact-link {
        padding: 8px 12px;
        font-size: 12px;
        gap: 6px;
    }
    
    .contact-icon {
        font-size: 12px;
    }
}

/* Responsive Ad Image Scaling */
/* Desktop (1200px and up) */
@media (min-width: 1200px) {
    .ad-image {
        min-height: 180px;
        max-height: 350px;
    }
    
    .ad-image img {
        max-height: 350px;
    }
}

/* Tablet (768px to 1199px) */
@media (min-width: 768px) and (max-width: 1199px) {
    .ad-image {
        min-height: 160px;
        max-height: 280px;
    }
    
    .ad-image img {
        max-height: 280px;
    }
}

/* Mobile (up to 767px) */
@media (max-width: 767px) {
    .ad-image {
        min-height: 120px;
        max-height: 200px;
        margin-bottom: 10px;
    }
    
    .ad-image img {
        max-height: 200px;
    }
    
    .ad-content {
        padding: 0 3px;
    }
    
    .ad-title {
        font-size: 13px;
        margin-bottom: 4px;
    }
    
    .ad-description {
        font-size: 11px;
    }
}

/* Small Mobile (up to 480px) */
@media (max-width: 480px) {
    .ad-image {
        min-height: 100px;
        max-height: 160px;
        margin-bottom: 8px;
    }
    
    .ad-image img {
        max-height: 160px;
    }
    
    .ad-title {
        font-size: 12px;
    }
    
    .ad-description {
        font-size: 10px;
    }
}

/* Profile Card New Design */
.profile-card-new {
    padding: 20px;
    background-color: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
}

.profile-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.profile-picture-container {
    position: relative;
}

.profile-picture {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.profile-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--bg-color);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--secondary-text-color);
    font-weight: 500;
}

.profile-info {
    flex: 1;
}

/* Profile Link */
.profile-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: opacity 0.2s ease;
}

.profile-link:hover {
    opacity: 0.8;
}

.profile-link:hover .profile-name {
    color: var(--blue-primary);
}

.profile-name {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
}

.profile-handle {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: var(--secondary-text-color);
}

/* User Type Badge */
.user-type-badge {
    margin: 8px 0;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-innovator {
    background-color: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.badge-investor {
    background-color: #f3e5f5;
    color: #7b1fa2;
    border: 1px solid #e1bee7;
}

.dark-mode .badge-innovator {
    background-color: rgba(25, 118, 210, 0.2);
    color: #64b5f6;
    border-color: rgba(25, 118, 210, 0.3);
}

.dark-mode .badge-investor {
    background-color: rgba(123, 31, 162, 0.2);
    color: #ba68c8;
    border-color: rgba(123, 31, 162, 0.3);
}

/* Profile Bio */
.profile-bio {
    margin: 8px 0;
    font-size: 13px;
    color: var(--text-color);
    line-height: 1.4;
    font-style: italic;
}

/* Profile Details */
.profile-details {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-detail {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--secondary-text-color);
}

.profile-detail i {
    width: 12px;
    text-align: center;
    font-size: 10px;
}

.profile-stats {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.stat-number {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--secondary-text-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Innovation Card Design */
.innovation-card {
    padding: 20px;
    background-color: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
    text-align: center;
}

.innovation-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
}

.innovation-description {
    margin: 0 0 20px 0;
    font-size: 14px;
    color: var(--secondary-text-color);
    line-height: 1.4;
}


/* Suggestions Card Design */
.suggestions-card {
    padding: 20px;
    background-color: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
}

.suggestions-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.suggestions-icon {
    font-size: 16px;
    color: var(--blue-primary);
}

.suggestions-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
}

.suggestions-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Suggestion Item */
.suggestion-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background-color: var(--bg-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.suggestion-item:hover {
    background-color: var(--hover-color);
    border-color: var(--blue-primary);
}

.suggestion-avatar {
    flex-shrink: 0;
}

.suggestion-profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.suggestion-info {
    flex: 1;
    min-width: 0;
}

.suggestion-name {
    margin-bottom: 4px;
}

.suggestion-full-name {
    margin: 0 0 2px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.2;
}

.suggestion-username {
    font-size: 12px;
    color: var(--secondary-text-color);
    font-weight: normal;
}

.suggestion-badge {
    margin: 4px 0;
}

.badge-small {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 8px;
}

.suggestion-bio {
    margin: 4px 0;
    font-size: 12px;
    color: var(--text-color);
    line-height: 1.3;
    font-style: italic;
}

.suggestion-stats {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.suggestion-stat {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: var(--secondary-text-color);
}

.suggestion-stat i {
    font-size: 10px;
}

.suggestion-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.suggestion-follow-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--blue-primary);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
}

.suggestion-follow-btn:hover {
    background-color: var(--blue-dark);
    transform: scale(1.05);
}

.suggestion-follow-btn.following {
    background-color: #28a745;
}

.suggestion-follow-btn.following:hover {
    background-color: #dc3545;
}

.suggestion-follow-btn.following i:before {
    content: "\f007"; /* user-check icon */
}

/* No Suggestions State */
.no-suggestions {
    text-align: center;
    padding: 20px;
    color: var(--secondary-text-color);
}

.no-suggestions i {
    font-size: 24px;
    margin-bottom: 8px;
    color: var(--border-color);
}

.no-suggestions p {
    margin: 0 0 4px 0;
    font-size: 14px;
}

.no-suggestions small {
    font-size: 12px;
    color: var(--secondary-text-color);
}

/* Premium Notice Card Design */
.premium-notice-card {
    padding: 20px;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    border-radius: 10px;
    border: 1px solid #ffd700;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.premium-notice-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 140, 0, 0.1));
    pointer-events: none;
}

.premium-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.premium-icon {
    font-size: 18px;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.premium-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.premium-content {
    position: relative;
    z-index: 1;
}

.premium-description {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    line-height: 1.4;
}

.premium-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.premium-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.premium-features li i {
    font-size: 12px;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.premium-upgrade-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.premium-upgrade-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.premium-upgrade-btn i {
    margin-right: 6px;
    font-size: 12px;
}

/* Dark mode adjustments */
.dark-mode .profile-placeholder {
    background-color: var(--bg-color);
    color: var(--secondary-text-color);
}


.dark-mode .suggestions-icon {
    color: #4FC3F7;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ads-card,
    .profile-card-new,
    .innovation-card,
    .suggestions-card,
    .premium-notice-card,
    .footer-links {
        padding: 16px;
        margin-bottom: 15px;
    }
    
    .ad-image {
        height: 120px;
    }
    
    .ad-title {
        font-size: 13px;
    }
    
    .ad-description {
        font-size: 11px;
    }
    
    .profile-picture,
    .profile-placeholder {
        width: 50px;
        height: 50px;
    }
    
    .profile-name {
        font-size: 15px;
    }
    
    .profile-handle {
        font-size: 13px;
    }
    
    .profile-bio {
        font-size: 12px;
    }
    
    .profile-detail {
        font-size: 11px;
    }
    
    .badge {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .stat-number {
        font-size: 16px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    /* Suggestions mobile styles */
    .suggestion-item {
        padding: 10px;
        gap: 10px;
    }
    
    .suggestion-profile-pic {
        width: 36px;
        height: 36px;
    }
    
    .suggestion-full-name {
        font-size: 13px;
    }
    
    .suggestion-username {
        font-size: 11px;
    }
    
    .suggestion-bio {
        font-size: 11px;
    }
    
    .suggestion-stats {
        gap: 6px;
    }
    
    .suggestion-stat {
        font-size: 10px;
    }
    
    .suggestion-follow-btn {
        width: 28px;
        height: 28px;
        font-size: 10px;
    }
    
    /* Show mobile ads section on mobile */
    .mobile-ads-section {
        display: block;
    }
    
    .innovation-title {
        font-size: 16px;
    }
    
    .innovation-description {
        font-size: 13px;
    }
    
    
    .suggestions-title {
        font-size: 15px;
    }
    
    .no-suggestions {
        font-size: 13px;
    }
    
    /* Footer responsive adjustments */
    .footer-links-container {
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
        display: none; /* Hide footer links on mobile */
    }
    
    .footer-links-container a {
        font-size: 12px;
        padding: 4px 8px;
        display: none;
        
    }
    
    .copyright {
        text-align: center;
        font-size: 11px;
        
    }
}

/* Tablet responsive adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .left-sidebar {
        flex: 0 0 280px;
        order: 2;
    }
    
    .right-sidebar {
        display: none;
    }
    
    .main-content {
        max-width: 100%;
        flex: 1;
        order: 1;
    }
    
    .page-container {
        gap: 20px;
        flex-direction: column;
    }
    
    /* Tablet layout: Profile Card (1), Create Post (2), Premium Notice (3), Suggestions (4), Innovation (5), Posts (6) */
    .profile-card-new {
        order: 1;
    }
    
    .create-post-card {
        order: 2;
    }
    
    .premium-notice-card {
        order: 3;
    }
    
    .suggestions-card {
        order: 4;
    }
    
    .innovation-card {
        order: 5;
    }
    
    .post-feed {
        order: 6;
    }
    
    .footer-links {
        order: 7;
        display: none;
    }
}

/* User Type Badges and Partner Condition Styles */
.user-type-badges {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.user-type-badge {
    display: inline-block;
    font-size: 13px;
    font-weight: normal;
    color: var(--secondary-text-color);
}

.partner-condition {
    display: inline-block;
    font-size: 13px;
    font-weight: normal;
    color: var(--secondary-text-color);
}

.badge-separator {
    color: var(--secondary-text-color);
    font-size: 13px;
    margin: 0 2px;
}

/* Comment Modal Mobile-Friendly Styles */
.comment-modal-content {
    display: flex;
    flex-direction: column;
    height: 90vh;
    max-height: 90vh;
    margin: 5vh auto;
}

.comment-modal-content .modal-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    padding: 0;
}

/* Comment input area at the top */
.modal-comment-input-area {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    background: var(--card-bg);
    flex-shrink: 0;
}

.modal-comment-input-area .comment-form {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--hover-color);
    padding: 10px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.modal-comment-input-area .comment-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: var(--text-color);
    padding: 5px 10px;
}

.modal-comment-input-area .comment-input::placeholder {
    color: var(--secondary-text-color);
}

.modal-comment-input-area .comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.modal-comment-input-area .comment-submit-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.modal-comment-input-area .comment-submit-btn:hover {
    background: var(--blue-dark);
}

/* Original post container */
.modal-post-container {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    background: var(--card-bg);
    flex-shrink: 0;
    max-height: 200px;
    overflow-y: auto;
}

/* Scrollable comments container */
.modal-comment-list-container {
    flex: 1;
    overflow-y: auto;
    background: var(--card-bg);
}

.modal-comment-list {
    padding: 15px;
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    .comment-modal-content {
        height: 100vh;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
        width: 100%;
        max-width: 100%;
    }
    
    .comment-modal-content .modal-header {
        position: sticky;
        top: 0;
        z-index: 10;
        background: var(--card-bg);
        border-bottom: 1px solid var(--border-color);
    }
    
    .modal-comment-input-area {
        position: sticky;
        top: 60px; /* Height of modal header */
        z-index: 9;
        padding: 10px 15px;
    }
    
    .modal-comment-input-area .comment-form {
        padding: 8px 12px;
        border-radius: 25px;
    }
    
    .modal-comment-input-area .comment-input {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 8px 12px;
    }
    
    .modal-comment-input-area .comment-avatar {
        width: 36px;
        height: 36px;
    }
    
    .modal-comment-input-area .comment-submit-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .modal-post-container {
        padding: 70px 15px;
        max-height: 150px;
    }
    
    .modal-comment-list {
        padding: 10px 15px;
    }
    
    /* Ensure keyboard doesn't push input off screen */
    @supports (-webkit-touch-callout: none) {
        .comment-modal-content {
            height: -webkit-fill-available;
            height: 100vh;
        }
        
        .modal-comment-input-area {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            top: auto;
            background: var(--card-bg);
            border-top: 1px solid var(--border-color);
            border-bottom: none;
            padding: 10px;
            z-index: 1000;
        }
        
        .modal-comment-list-container {
            padding-bottom: 80px; /* Space for fixed input */
        }
    }
    
    /* Additional mobile optimizations */
    .comment-modal-content .modal-header {
        min-height: 60px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 15px 20px;
    }
    
    .comment-modal-content .modal-header h3 {
        margin: 0;
        font-size: 18px;
        font-weight: 600;
    }
    
    .comment-modal-content .close-btn {
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
        color: var(--text-color);
        padding: 5px;
        line-height: 1;
    }
    
    /* Smooth scrolling for comments */
    .modal-comment-list-container {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    /* Loading states */
    .comment-submit-btn.loading {
        pointer-events: none;
        opacity: 0.7;
    }
    
    .comment-submit-btn i.fa-spinner {
        animation: spin 1s linear infinite;
    }
    
    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }
    
    /* Better touch targets for mobile */
    .comment-submit-btn {
        min-width: 36px;
        min-height: 36px;
    }
    
    .comment-input {
        min-height: 36px;
    }
    
    /* Improve comment item spacing on mobile */
    .modal-comment-list .comment-item {
        padding: 10px 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    .modal-comment-list .comment-item:last-child {
        border-bottom: none;
    }
}

/* Mobile responsive styles for badges */
@media (max-width: 768px) {
    .post-author-info .user-type-badges {
        flex-wrap: wrap;
        gap: 4px;
        justify-content: flex-start !important;
    }
    
    .user-type-badge, .partner-condition {
        font-size: 10px;
        padding: 2px 6px;
        white-space: nowrap;
    }
    
    .badge-separator {
        font-size: 10px;
    }
}

/* Repost Popup Styles */
.repost-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease-out;
}

.repost-popup-content {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    max-width: 320px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: slideUp 0.3s ease-out;
}

.repost-popup-content h4 {
    margin: 0 0 15px 0;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
}

.repost-option-btn {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 10px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.repost-option-btn:hover {
    background: var(--hover-bg);
    border-color: var(--primary-color);
}

.repost-option-btn i {
    font-size: 18px;
    color: var(--primary-color);
    width: 20px;
}

.repost-option-btn span {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.repost-option-btn small {
    display: block;
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 2px;
}

.repost-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.repost-close-btn:hover {
    color: var(--text-primary);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dark mode support for repost popup */
.dark-mode .repost-popup-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

.dark-mode .repost-option-btn {
    background: var(--card-bg);
    border-color: var(--border-color);
}

.dark-mode .repost-option-btn:hover {
    background: var(--hover-bg);
}

/* Chat popup - minimized state */
.chat-popup.minimized {
    height: 56px !important;
    width: 320px !important;
    border-radius: 12px;
    overflow: visible;
}
.chat-popup.minimized .chat-header {
    padding: 10px 12px;
}
.chat-popup.minimized .message-area,
.chat-popup.minimized .message-input-area {
    display: none !important;
}

/* File preview styles */
.file-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    max-width: 200px;
}

.file-icon {
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.file-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.file-name {
    font-weight: 500;
    font-size: 12px;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.file-size {
    font-size: 10px;
    color: var(--secondary-text-color);
    margin-top: 2px;
}

.chat-attachment-preview .remove-attachment-btn {
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    padding: 0 8px;
    border-radius: 4px;
    cursor: pointer;
}

/* Message layout - ensure proper flex layout for actions on right */
.message {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    padding: 8px 12px;
    position: relative;
}

.message.outgoing {
    justify-content: flex-end;
}

.message.incoming {
    justify-content: flex-start;
}

.message-avatar {
    flex-shrink: 0;
    margin-right: 8px;
    margin-left: 0;
}

.message.outgoing .message-avatar {
    order: 2;
    margin-right: 0;
    margin-left: 8px;
}

.message-content {
    flex: 1;
    min-width: 0;
    max-width: 70%;
    position: relative; /* ensure dropdowns inside can position absolutely */
}

.message.outgoing .message-content {
    order: 1;
}




/* small modal styles for chat edit */
.modal.small-modal .modal-content {
    max-width: 420px;
}

/* Ensure chat edit modal appears above chat popup */
#chat-edit-modal {
    z-index: 10002 !important;
    position: fixed !important;
}

/* Ensure chat popup has proper z-index */
.chat-popup {
    z-index: 10001 !important;
}

/* Desktop-specific chat edit modal styles */
@media (min-width: 769px) {
    #chat-edit-modal {
        z-index: 10002 !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px;
    }
    
    #chat-edit-modal .modal-content {
        max-width: 500px;
        width: 100%;
        margin: 0;
        max-height: 80vh;
        overflow-y: auto;
        border-radius: 12px;
        background-color: var(--card-bg);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }
    
    #chat-edit-modal .modal-header {
        padding: 20px 25px;
        border-bottom: 1px solid var(--border-color);
        display: flex;
        justify-content: space-between;
        align-items: center;
        background-color: var(--card-bg);
    }
    
    #chat-edit-modal .modal-header h3 {
        margin: 0;
        color: var(--text-color);
        font-size: 18px;
        font-weight: 600;
    }
    
    #chat-edit-modal .modal-body {
        padding: 25px;
    }
    
    #chat-edit-modal textarea {
        font-size: 14px;
        min-height: 100px;
        resize: vertical;
        width: 100%;
        padding: 12px 15px;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        background-color: var(--card-bg);
        color: var(--text-color);
        font-family: inherit;
        line-height: 1.5;
    }
    
    #chat-edit-modal textarea:focus {
        outline: none;
        border-color: var(--blue-primary);
        box-shadow: 0 0 0 2px rgba(26, 173, 241, 0.2);
    }
    
    #chat-edit-modal .modal-actions {
        display: flex;
        gap: 12px;
        margin-top: 20px;
        justify-content: flex-end;
    }
    
    #chat-edit-modal .modal-actions button {
        padding: 10px 20px;
        font-size: 14px;
        border-radius: 6px;
        border: none;
        cursor: pointer;
        font-weight: 500;
        transition: all 0.2s ease;
        min-width: 80px;
    }
    
    #chat-edit-modal .modal-actions .btn-secondary {
        background-color: var(--secondary-text-color);
        color: white;
    }
    
    #chat-edit-modal .modal-actions .btn-secondary:hover {
        background-color: var(--text-color);
        opacity: 0.9;
    }
    
    #chat-edit-modal .modal-actions .btn-primary {
        background-color: var(--blue-primary);
        color: white;
        pointer-events: auto;
        user-select: none;
    }
    
    #chat-edit-modal .modal-actions .btn-primary:hover {
        background-color: var(--blue-dark);
        opacity: 0.9;
        transform: translateY(-1px);
    }
    
    #chat-edit-modal .modal-actions .btn-primary:active {
        transform: translateY(0);
        opacity: 0.8;
    }
    
    #chat-edit-modal .modal-actions .btn-primary:disabled {
        background-color: var(--secondary-text-color);
        cursor: not-allowed;
        opacity: 0.6;
        pointer-events: none;
    }
    
    /* Loading state for save button */
    #chat-edit-modal .modal-actions .btn-primary.loading {
        background-color: var(--blue-primary);
        cursor: not-allowed;
        opacity: 0.8;
        pointer-events: none;
        position: relative;
    }
    
    #chat-edit-modal .modal-actions .btn-primary.loading::after {
        content: '';
        position: absolute;
        width: 16px;
        height: 16px;
        margin: auto;
        border: 2px solid transparent;
        border-top-color: #ffffff;
        border-radius: 50%;
        animation: button-spin 1s linear infinite;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }
    
    @keyframes button-spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }
    
    #chat-edit-modal .close-btn {
        background: none;
        border: none;
        font-size: 20px;
        cursor: pointer;
        color: var(--text-color);
        padding: 5px;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 4px;
        transition: background-color 0.2s ease;
    }
    
    #chat-edit-modal .close-btn:hover {
        background-color: var(--hover-color);
    }
}

/* Mobile-specific chat edit modal styles */
@media (max-width: 768px) {
    #chat-edit-modal {
        z-index: 10002 !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px;
    }
    
    #chat-edit-modal .modal-content {
        max-width: 100%;
        width: 100%;
        margin: 0;
        max-height: 90vh;
        overflow-y: auto;
        border-radius: 12px;
        background-color: var(--card-bg);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }
    
    #chat-edit-modal .modal-header {
        padding: 15px 20px;
        border-bottom: 1px solid var(--border-color);
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    #chat-edit-modal .modal-body {
        padding: 20px;
    }
    
    #chat-edit-modal textarea {
        font-size: 16px; /* Prevent zoom on iOS */
        min-height: 120px;
        resize: vertical;
        width: 100%;
        padding: 12px;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        background-color: var(--card-bg);
        color: var(--text-color);
    }
    
    #chat-edit-modal .modal-actions {
        display: flex;
        gap: 10px;
        margin-top: 20px;
    }
    
    #chat-edit-modal .modal-actions button {
        flex: 1;
        padding: 12px 20px;
        font-size: 16px;
        border-radius: 8px;
        border: none;
        cursor: pointer;
    }
    
    #chat-edit-modal .modal-actions .btn-secondary {
        background-color: var(--secondary-text-color);
        color: white;
    }
    
    #chat-edit-modal .modal-actions .btn-primary {
        background-color: var(--blue-primary);
        color: white;
    }
    
    /* Loading state for save button on mobile */
    #chat-edit-modal .modal-actions .btn-primary.loading {
        background-color: var(--blue-primary);
        cursor: not-allowed;
        opacity: 0.8;
        pointer-events: none;
        position: relative;
    }
    
    #chat-edit-modal .modal-actions .btn-primary.loading::after {
        content: '';
        position: absolute;
        width: 16px;
        height: 16px;
        margin: auto;
        border: 2px solid transparent;
        border-top-color: #ffffff;
        border-radius: 50%;
        animation: button-spin 1s linear infinite;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }
    
    #chat-edit-modal .close-btn {
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
        color: var(--text-color);
        padding: 0;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Chat message media styling */
.message-media {
    margin-top: 8px;
}
.message-media img {
    max-width: 240px;
    max-height: 320px;
    width: auto;
    height: auto;
    border-radius: 8px;
    display: block;
}
.message-media video {
    max-width: 280px;
    max-height: 320px;
    display: block;
    border-radius: 8px;
}
.edit-message-body textarea,
#chat-edit-text {
    width: 100%;
    min-height: 90px;
    padding: 8px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 6px;
}
.edit-message-body textarea:focus,
#chat-edit-text:focus {
    outline: none;
    border-color: var(--blue-primary, #1aadf1);
    box-shadow: 0 0 0 2px rgba(26, 173, 241, 0.2);
}
.edit-message-body {
    margin-top: 10px;
}
.edit-message-actions {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.edit-message-actions button {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}
.edit-message-actions .btn-secondary {
    background-color: var(--secondary-text-color);
    color: white;
}
.edit-message-actions .btn-secondary:hover {
    background-color: var(--text-color);
    opacity: 0.9;
}

.edit-message-actions .btn-primary {
    background-color: var(--blue-primary);
    color: white;
}
.edit-message-actions .btn-primary:hover {
    background-color: var(--blue-dark);
    opacity: 0.9;
    transform: translateY(-1px);
}
.edit-message-actions .btn-primary:active {
    transform: translateY(0);
    opacity: 0.8;
}
.edit-message-actions .btn-primary:disabled {
    background-color: var(--secondary-text-color);
    cursor: not-allowed;
    opacity: 0.6;
    pointer-events: none;
}
/* Loading state for save button */
.edit-message-actions .btn-primary.loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}
.edit-message-actions .btn-primary.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: button-spin 1s linear infinite;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}
@keyframes button-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* Dark mode support for chat edit */
.dark-mode #chat-edit-modal .modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}
.dark-mode #chat-edit-modal textarea {
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}   
.dark-mode .file-preview {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
}
.dark-mode .file-name {
    color: var(--text-color);
}
.dark-mode .file-size {
    color: var(--secondary-text-color);
}
.dark-mode .file-icon {
    color: var(--primary-color);
}
/* Suggestions Card Styles */
.suggestions-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-bottom: 20px;
}
.suggestions-card .suggestions-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}
.suggestions-card .suggestions-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}
.suggestions-card .suggestions-header .suggestions-icon {
    font-size: 20px;
    color: var(--primary-color);
}
.suggestions-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}
.suggestion-item:last-child {
    border-bottom: none;
}
.suggestion-profile-pic {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.suggestion-info {
    flex: 1;
    min-width: 0;
}
.suggestion-full-name {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-username {
    margin: 2px 0 6px 0;
    font-size: 13px;
    color: var(--secondary-text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.suggestion-bio {
    margin: 0;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
    max-height: 2.8em; /* Limit to 2 lines */
    overflow: hidden;
    text-overflow: ellipsis;
}
.suggestion-stats {
    display: flex;
    gap: 12px;
    margin-top: 6px;
    font-size: 11px;
    color: var(--secondary-text-color);
}
.suggestion-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}
.suggestion-stat i {
    font-size: 12px;
    color: var(--primary-color);
}
.suggestion-follow-btn {
    background-color: var(--blue-primary);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}
.suggestion-follow-btn:hover {
    background-color: var(--blue-dark);
}
.suggestion-follow-btn:disabled {
    background-color: var(--secondary-text-color);
    cursor: not-allowed;
    opacity: 0.6;
}
.suggestions-card .no-suggestions {
    text-align: center;
    color: var(--secondary-text-color);
    font-size: 14px;
    padding: 20px 0;
}
/* Premium Notice Card Styles */
.premium-notice-card {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    border-radius: 12px;
    padding: 20px;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    text-align: center;
}
.premium-notice-card h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.premium-notice-card p {
    margin: 0 0 15px 0;
    font-size: 14px;
    line-height: 1.5;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.premium-upgrade-btn {
    background-color: rgba(255, 255, 255, 0.9);
    color: #ff6f61;
    border: 2px solid rgba(255, 255, 255, 0.7);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.premium-upgrade-btn i {
    font-size: 16px;
}
.premium-upgrade-btn:hover {
    background-color: #fff;
    border-color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}
.premium-upgrade-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
/* Dark mode support for premium notice */
.dark-mode .premium-notice-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
/* Mobile responsive styles */
@media (max-width: 768px) {
    .page-container {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .left-sidebar, .right-sidebar {
        display: none;
    }
    
    .main-content {
        max-width: 100%;
        flex: 1;
    }
    
    /* Mobile layout: Profile Card (1), Create Post (2), Premium Notice (3), Suggestions (4), Innovation (5), Posts (6) */
    .profile-card-new {
        order: 1;
    }
    
    .create-post-card {
        order: 2;
    }
    
    .premium-notice-card {
        order: 3;
    }
    
    .suggestions-card {
        order: 4;
    }
    
    .innovation-card {
        order: 5;
    }
    
    .post-feed {
        order: 6;
    }
    
    .footer-links {
        order: 7;
        display: none;
    }
    
    /* Profile Card mobile styles */
    .profile-card-new {
        padding: 15px;
    }
    
    .profile-avatar {
        width: 72px;
        height: 72px;
    }
    
    .profile-full-name {
        font-size: 16px;
        font-weight: 600;
    }
    .profile-username {
        font-size: 13px;
    }
    .profile-bio {
        font-size: 12px;
    }
    .profile-stats {
        gap: 12px;
        font-size: 11px;
    }
    .profile-stat i {
        font-size: 11px;
        color: var(--secondary-text-color);
    }
    .profile-edit-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    /* Footer links mobile styles */
    .footer-links-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        font-size: 12px;
        margin-top: 10px;
        gap: 8px;
    }
    .footer-links a {
        font-size: 12px;
    }
    .footer-links {
        margin-bottom: 10px;
    }
    .footer-copy {
        font-size: 11px;
    }
}
@media (min-width: 769px) and (max-width: 1024px) {
    .left-sidebar {
        display: none;
    }
    
    .right-sidebar {
        flex: 0 0 280px;
        order: 2;
    }
    
    .main-content {
        max-width: 100%;
        flex: 1;
        order: 1;
    }
    
    .page-container {
        gap: 20px;
        flex-direction: row;
    }
    
    /* Tablet layout: Profile Card (1), Create Post (2), Premium Notice (3), Suggestions (4), Innovation (5), Posts (6) */
    .profile-card-new {
        order: 1;
    }
    
    .create-post-card {
        order: 2;
    }
    
    .premium-notice-card {
        order: 3;
    }
    
    .suggestions-card {
        order: 4;
    }
    
    .innovation-card {
        order: 5;
    }
    
    .post-feed {
        order: 6;
    }
    
    .footer-links {
        order: 7;
        display: none;
    }
}
/* Dark mode support for suggestions card */
.dark-mode .suggestions-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}
.dark-mode .suggestion-full-name {
    color: var(--text-color);
}
.dark-mode .suggestion-username {
    color: var(--secondary-text-color);
}
.dark-mode .suggestion-bio {
    color: var(--text-secondary);
}
.dark-mode .suggestion-stat {
    color: var(--secondary-text-color);
}
.dark-mode .suggestion-stat i {
    color: var(--primary-color);
}
.dark-mode .suggestion-follow-btn {
    background-color: var(--blue-primary);
    color: white;
}
.dark-mode .suggestion-follow-btn:hover {
    background-color: var(--blue-dark);
}
.dark-mode .suggestion-follow-btn:disabled {
    background-color: var(--secondary-text-color);
    cursor: not-allowed;
    opacity: 0.6;
}
/* Dark mode support for footer links */
.dark-mode .footer-links a {
    color: var(--secondary-text-color);
}
.dark-mode .footer-links a:hover {
    color: var(--text-color);
}
.dark-mode .footer-copy {
    color: var(--secondary-text-color);
}
/* Comment Modal Styles */
.comment-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease-out;
}   
.comment-modal-content {
    background: var(--card-bg);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: slideDown 0.3s ease-out;
}
.comment-modal-content .modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--card-bg);
}
.comment-modal-content .modal-header h3 {
    margin: 0;
    color: var(--text-color);
    font-size: 18px;
    font-weight: 600;
}
.comment-modal-content .close-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-color);
    padding: 5px;
    line-height: 1;
}
.comment-modal-content .close-btn:hover {
    color: var(--text-primary);
}
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.modal-comment-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}
.modal-comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.modal-comment-list .comment-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}
.modal-comment-list .comment-item:last-child {
    border-bottom: none;
}
.modal-comment-list .comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.modal-comment-list .comment-content {
    flex: 1;
    min-width: 0;
}
.modal-comment-list .comment-full-name {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}
.modal-comment-list .comment-username {
    margin: 2px 0 6px 0;
    font-size: 13px;
    color: var(--secondary-text-color);
}
.modal-comment-list .comment-text {
    margin: 0;
    font-size: 14px;
    color: var(--text-color);
    line-height: 1.4;
}
.modal-comment-list .comment-timestamp {
    font-size: 11px;
    color: var(--secondary-text-color);
    margin-top: 4px;
}

.comment-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 14px;
    resize: none;
    min-height: 36px;
    max-height: 100px;
    overflow-y: auto;
    font-family: inherit;
    color: var(--text-color);
}
.comment-input:focus {
    outline: none;
    border-color: var(--blue-primary);
    box-shadow: 0 0 0 2px rgba(26, 173, 241, 0.2);
}
.comment-submit-btn {
    background-color: var(--blue-primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}
.comment-submit-btn i {
    font-size: 16px;
}
.comment-submit-btn:hover {
    background-color: var(--blue-dark);
}
.comment-submit-btn:disabled {
    background-color: var(--secondary-text-color);
    cursor: not-allowed;
    opacity: 0.6;
}
/* Loading state for submit button */
.comment-submit-btn.loading {
    pointer-events: none;
    opacity: 0.6;
}
.comment-submit-btn.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* Dark mode support for comment modal */
.dark-mode .comment-modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}
.dark-mode .modal-header h3 {
    color: var(--text-color);
}
.dark-mode .modal-comment-list-container {
    border-bottom: 1px solid var(--border-color);
}
.dark-mode .modal-comment-list .comment-item {
    border-bottom: 1px solid var(--border-color);
}
.dark-mode .modal-comment-list .comment-full-name {
    color: var(--text-color);
}
.dark-mode .modal-comment-list .comment-username {
    color: var(--secondary-text-color);
}
.dark-mode .modal-comment-list .comment-text {
    color: var(--text-color);
}
.dark-mode .modal-comment-list .comment-timestamp {
    color: var(--secondary-text-color);
}
.dark-mode .comment-input {
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}
.dark-mode .comment-submit-btn {
    background-color: var(--blue-primary);
    color: white;
}
.dark-mode .comment-submit-btn:hover {
    background-color: var(--blue-dark);
}
/* Repost Popup Styles */
.repost-popup { 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease-out;
}
.repost-popup-content {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: slideUp 0.3s ease-out;
}
.repost-popup-content h3 {
    margin: 0 0 15px 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}
.repost-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.repost-option-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
.repost-option-btn:hover {
    background: var(--hover-bg);
    border-color: var(--blue-primary);
}
.repost-option-btn i {
    font-size: 18px;
    color: var(--primary-color);
    flex-shrink: 0;
}
.repost-option-btn span {
    font-size: 14px;
    color: var(--text-color);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}   
.repost-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
}
/* repost wrapper new */
.repost-wrapper {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    background: var(--card-bg);
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
}

.repost-header {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    background: linear-gradient(90deg, rgba(0,0,0,0.02), transparent);
    border-bottom: 1px solid rgba(0,0,0,0.03);
}

.repost-reposter-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.repost-reposter-info { font-size: 0.95rem; }
.repost-reposter-info .repost-action { font-size: 0.8rem; color: var(--text-secondary); }

.repost-original { padding: 12px; }

/* Distinguish original author attribution */
.repost-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-top: 1px solid rgba(0,0,0,0.03);
    gap: 12px;
    background: rgba(0,0,0,0.01);
}

.original-author {
    display: flex;
    gap: 10px;
    align-items: center;
}

.original-author-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
}

.repost-summary {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Repost summary footer - shows at bottom of all posts */
.repost-summary-footer {
    padding: 10px 0 0 0;
    margin-top: 10px;
    border-top: 1px solid var(--border-color);
}

.repost-summary-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.repost-summary-text::before {
    content: "📤";
    font-size: 0.9rem;
}

/* Repost chain small visual (stacked avatars) */
.repost-chain {
    display:flex;
    align-items:center;
    gap:6px;
}
.repost-chain .chain-avatar {
    width:22px;
    height:22px;
    border-radius:50%;
    border:2px solid var(--card-bg);
    box-shadow:0 1px 0 rgba(0,0,0,0.05);
}

/* Reposter link styling */
.reposter-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.reposter-link:hover {
    text-decoration: none;
    opacity: 0.9;
}

/* Original author meta */
.original-author-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.original-author-meta a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.original-author-meta a:hover {
    text-decoration: underline;
}

/* Standalone post (not a repost) */
.post.standalone-post {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 15px;
    background: var(--card-bg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Post media item */
.post-media-item {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

/* Buttons */
.repost-btn { 
    background: none; 
    border: none; 
    cursor: pointer; 
}

.repost-btn.reposted { 
    color: var(--primary-color);
}

.repost-btn.reposted i { 
    color: var(--primary-color); 
}

.repost-count { 
    margin-left: 6px; 
    font-weight: 600; 
}

/* Small responsive tweaks */
@media (max-width: 768px) {
    .repost-header { padding: 8px; }
    .repost-original { padding: 10px; }
    .repost-footer { padding: 8px; }
}
/* ...existing code... */

