
        :root {
            --primary-color: #3a86ff;
            --secondary-color: #8338ec;
            --accent-color: #ff006e;
            --dark-color: #1a1a2e;
            --light-color: #f8f9fa;
            --gray-color: #6c757d;
            --success-color: #28a745;
            --danger-color: #dc3545;
            --warning-color: #fd7e14;
            --skeleton-bg-color: #e0e0e0;
            --shimmer-color: #f0f0f0;
            --primary-color-rgb: 58, 134, 255; /* Added for rgba() usage */
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        body {
            background-color: #f5f5f5;
            color: var(--dark-color);
            min-height: 100vh;
            padding-bottom: 0; /* Will be adjusted by media queries if bottom nav is present */
        }

        /* Skeleton Loader CSS */
        /* Updated Shimmer Effect */
        @keyframes shimmer {
          0% { left: -100%; }
          100% { left: 100%; }
        }

        .skeleton-loader { /* This will be the base for elements that need a shimmer */
            background-color: var(--skeleton-bg-color);
            border-radius: 4px;
            position: relative;
            overflow: hidden; /* Important for the shimmer effect */
        }

        .skeleton-loader.shimmer::before { /* Apply shimmer to elements with .shimmer class */
            content: "";
            position: absolute;
            top: 0;
            left: -100%; /* Start off-screen to the left */
            width: 100%;
            height: 100%;
            background: linear-gradient(
              90deg,
              transparent,
              rgba(255, 255, 255, 0.4), /* Shimmer color */
              transparent
            );
            animation: shimmer 1.5s infinite;
        }
        /* End Updated Shimmer Effect */

        .skeleton-post-card {
            background-color: white;
            border-radius: 10px;
            margin-bottom: 20px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
            padding: 15px;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        .skeleton-post-card .header {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .skeleton-post-card .avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
        }
        .skeleton-post-card .user-info {
            flex-grow: 1;
        }
        .skeleton-post-card .line {
            height: 12px;
            margin-bottom: 6px;
        }
        .skeleton-post-card .line-sm {
            height: 10px;
            width: 70%;
        }
        .skeleton-post-card .media {
            height: 200px;
            border-radius: 8px;
        }
        .skeleton-post-card .actions {
            height: 20px;
            width: 60%;
        }

        .skeleton-story-item-wrapper {
            min-width: 100px;
            text-align: center;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 5px;
            margin-right: 15px;
        }
        .skeleton-story-item-wrapper .avatar {
            width: 70px;
            height: 70px;
            border-radius: 50%;
        }
        .skeleton-story-item-wrapper .line {
            width: 60px;
            height: 10px;
        }

        .skeleton-reel-grid-item-wrapper {
             width: 100%;
             height: 250px;
             border-radius: 10px;
        }

        .skeleton-reel-item-wrapper {
            width: 100%;
            height: calc(100vh - 60px);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .skeleton-reel-item-wrapper .media {
            width: 100%;
            height: 100%;
        }

        /* More Accurate Skeleton Loaders */
        .skeleton-user-list-item, .skeleton-notification-item, .skeleton-conversation-item {
            background-color: white;
            border-radius: 10px;
            margin-bottom: 10px; /* Consistent with message items */
            padding: 15px;
            display: flex;
            align-items: center;
            gap: 15px;
        }
        .skeleton-user-list-item .avatar,
        .skeleton-notification-item .avatar,
        .skeleton-conversation-item .avatar {
            width: 50px; /* Matches .message-item img, .user-list-item img */
            height: 50px;
            border-radius: 50%;
        }
        .skeleton-notification-item .avatar { /* Notifications have smaller avatar */
            width: 40px;
            height: 40px;
        }
        .skeleton-user-list-item .text-lines,
        .skeleton-notification-item .text-lines,
        .skeleton-conversation-item .text-lines {
            flex-grow: 1;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .skeleton-user-list-item .line-md, /* Medium line for name/title */
        .skeleton-notification-item .line-md,
        .skeleton-conversation-item .line-md {
            height: 12px;
            width: 70%;
        }
        .skeleton-user-list-item .line-sm, /* Small line for subtitle/username */
        .skeleton-notification-item .line-sm,
        .skeleton-conversation-item .line-sm {
            height: 10px;
            width: 50%;
        }
        .skeleton-notification-item .line-xs { /* Extra small for notification time */
            height: 8px;
            width: 30%;
        }
        .skeleton-conversation-item .time-placeholder { /* For conversation timestamp */
            width: 40px;
            height: 10px;
            margin-left: auto; /* Push to the right */
        }


        /* Media Loading Overlay & Spinner */
        .media-loading-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: #000000; /* Opaque black */
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 2;
            transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
            opacity: 1;
            visibility: visible;
        }
        .media-loading-overlay.hidden {
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
        }
        .spinner {
            border: 4px solid rgba(255, 255, 255, 0.2);
            border-left-color: #ffffff;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            animation: spin 1s linear infinite;
        }
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        /* End Media Loading Overlay & Spinner */

        /* Authentication Pages */
        .auth-container {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            padding: 20px;
        }

        .auth-card {
            background-color: white;
            border-radius: 10px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
            width: 100%;
            max-width: 400px;
            padding: 30px;
        }

        .auth-title {
            text-align: center;
            margin-bottom: 30px;
            color: var(--primary-color);
        }

        .auth-form .form-group {
            margin-bottom: 20px;
        }

        .auth-form label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
        }

        .auth-form input {
            width: 100%;
            padding: 12px 15px;
            border: 1px solid #ddd;
            border-radius: 5px;
            font-size: 16px;
            transition: all 0.3s;
        }

        .auth-form input:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(58, 134, 255, 0.2);
            outline: none;
        }

        .auth-btn {
            width: 100%;
            padding: 12px;
            background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
            color: white;
            border: none;
            border-radius: 5px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
        }

        .auth-btn:hover {
            opacity: 0.9;
            transform: translateY(-2px);
        }

        .auth-toggle {
            text-align: center;
            margin-top: 20px;
            color: var(--gray-color);
        }

        .auth-toggle a {
            color: var(--primary-color);
            text-decoration: none;
            font-weight: 600;
        }

        .auth-error {
            color: var(--danger-color);
            margin-bottom: 20px;
            text-align: center;
            font-size: 14px;
        }

        /* Main App */
        #app-container {
            display: none; /* Controlled by JS */
            width: 100%; /* Ensure it takes full width when visible */
        }

        .container {
            display: flex;
            min-height: 100vh;
        }

        /* Sidebar - Desktop */
        .sidebar {
            width: 250px;
            background-color: white;
            box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
            padding: 20px 0;
            position: fixed;
            height: 100vh;
            z-index: 100;
            display: none; /* Controlled by media query */
        }

        .logo {
            font-size: 24px;
            font-weight: bold;
            color: var(--primary-color);
            text-align: center;
            margin-bottom: 30px;
            padding: 0 20px;
        }

        .logo span {
            color: var(--secondary-color);
        }

        .nav-menu {
            list-style: none;
        }

        .nav-item {
            margin-bottom: 5px;
        }

        .nav-link {
            display: flex;
            align-items: center;
            padding: 12px 20px;
            color: var(--dark-color);
            text-decoration: none;
            /* transition: all 0.3s; /* Removed for fixed nav */
        }

        .nav-link:hover, .nav-link.active {
            background-color: rgba(58, 134, 255, 0.1);
            color: var(--primary-color);
            border-left: 3px solid var(--primary-color);
        }

        .nav-link i {
            margin-right: 10px;
            font-size: 20px;
        }

        .create-post-btn {
            background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
            color: white;
            border: none;
            border-radius: 30px;
            padding: 12px 20px;
            margin: 20px;
            width: calc(100% - 40px);
            font-weight: bold;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            /* transition: all 0.3s; /* Removed for fixed nav */
        }

        .create-post-btn:hover {
            /* transform: translateY(-2px); /* Optional: keep for interaction */
            /* box-shadow: 0 5px 15px rgba(58, 134, 255, 0.3); /* Optional: keep for interaction */
            opacity: 0.9; /* Simpler hover effect */
        }

        .create-post-btn i {
            margin-right: 8px;
        }

        /* Main Content */
        .main-content {
            flex: 1;
            padding-top: 60px; /* Height of the fixed header */
            padding-left: 20px;
            padding-right: 20px;
            padding-bottom: 60px; /* Space for bottom nav on mobile, adjusted by media query */
            position: relative;
        }

        .header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background-color: white;
            padding: 15px 20px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            width: 100%;
            z-index: 999;
            height: 60px;
            box-sizing: border-box;
            /* border-radius: 0; /* Removed, was in mobile query */
            /* transition: none; /* Explicitly no transition */
        }

        @media (min-width: 992px) {
            .header {
                left: 250px;
                width: calc(100% - 250px);
            }
             .main-content {
                padding-top: 60px; /* Match header height */
                padding-bottom: 20px; /* Reset bottom padding for desktop */
            }
        }

        @media (max-width: 991px) { /* Covers tablets and mobile */
            .main-content {
                 padding-top: 60px; /* Match header height */
                 padding-bottom: 60px; /* Space for bottom nav */
            }
        }

        @media (max-width: 767px) { /* Mobile specific adjustments for header and main content */
            .header {
                border-radius: 0;
            }
            .main-content {
                 padding-top: 60px; /* Match header height */
                 /* padding-bottom: 60px; /* Already set by max-width: 991px */
            }
        }


        .search-bar {
            position: relative;
            width: 40%;
        }

        .search-bar input {
            width: 100%;
            padding: 10px 15px 10px 40px;
            border: 1px solid #ddd;
            border-radius: 30px;
            outline: none;
            transition: all 0.3s;
        }

        .search-bar input:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(58, 134, 255, 0.2);
        }

        .search-bar i {
            position: absolute;
            left: 15px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--gray-color);
        }

        .user-actions {
            display: flex;
            align-items: center;
        }

        .search-icon-mobile, .notification-icon, .message-icon {
            position: relative;
            margin-right: 20px;
            cursor: pointer;
        }
        .search-icon-mobile {
            display: none; /* Hidden by default, shown on mobile */
        }

        .notification-icon i, .message-icon i, .search-icon-mobile i {
            font-size: 20px;
            color: var(--gray-color);
        }

        .notification-count, .message-count {
            position: absolute;
            top: -5px;
            right: -5px;
            background-color: var(--danger-color);
            color: white;
            border-radius: 50%;
            width: 18px;
            height: 18px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 10px;
            font-weight: bold;
        }

        .user-profile {
            display: flex;
            align-items: center;
            cursor: pointer;
        }

        .user-profile img {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            object-fit: cover;
            margin-right: 10px;
        }

        .user-profile span {
            font-weight: 600;
        }

        /* Content Area */
        .content-area {
            display: flex;
            gap: 20px;
        }

        .feed {
            flex: 1;
        }

        .sidebar-right {
            flex: 1;
        }

        /* Post Card */
        .post-card {
            background-color: #ffffff; /* Shiny white */
            border-radius: 16px; /* Softer radius */
            margin-bottom: 25px; /* Increased spacing */
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.07); /* Softer, slightly more pronounced shadow */
            border: 1px solid #f0f0f0; /* Very subtle border */
            overflow: hidden;
            transition: box-shadow 0.3s ease-in-out;
        }
        .post-card:hover {
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); /* Enhanced shadow on hover */
        }

        .post-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px 20px; /* Standardized padding */
            position: relative;
        }

        .post-user {
            display: flex;
            align-items: center;
            cursor: pointer;
        }

        .post-user img {
            width: 45px; /* Slightly larger avatar */
            height: 45px;
            border-radius: 50%;
            object-fit: cover;
            margin-right: 12px; /* Adjusted margin */
        }

        .post-user-info {
            display: flex;
            flex-direction: column;
        }

        .post-user-info h4 {
            font-size: 16px; /* Increased font size */
            font-weight: 600; /* Emphasized username */
            margin-bottom: 3px; /* Adjusted spacing */
            display: flex;
            align-items: center;
            color: var(--dark-color);
        }
        .post-user-info h4 .follow-button {
            margin-left: 10px;
            padding: 5px 10px; /* Slightly larger button */
            font-size: 12px;
            font-weight: 500;
            border-radius: 6px; /* Softer radius */
            border: 1px solid var(--primary-color);
            background-color: var(--primary-color);
            color: white;
            cursor: pointer;
            transition: all 0.2s ease-in-out;
        }
        .post-user-info h4 .follow-button.following {
            background-color: transparent;
            color: var(--primary-color);
            border: 1px solid var(--primary-color);
        }
        .post-user-info h4 .follow-button:hover {
            opacity: 0.8;
            /* transform: translateY(-1px); Removed for less jumpiness */
        }

        .post-user-info p { /* Timestamp and location */
            font-size: 13px; /* Slightly larger */
            color: var(--gray-color);
        }

        .post-options {
            cursor: pointer;
            color: var(--gray-color);
            position: relative;
        }

        .post-options-dropdown {
            position: absolute;
            top: 35px;
            right: 0;
            background-color: white;
            border-radius: 5px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            z-index: 10;
            min-width: 120px;
            display: none;
        }
        .post-options-dropdown button {
            display: block;
            width: 100%;
            padding: 10px 15px;
            text-align: left;
            background: none;
            border: none;
            cursor: pointer;
            font-size: 14px;
            color: var(--dark-color);
        }
        .post-options-dropdown button:hover {
            background-color: #f0f0f0;
        }
        .post-options-dropdown button.delete-btn {
            color: var(--danger-color);
        }


        .post-content {
            padding: 0 20px 15px 20px; /* Standardized padding */
        }

        .post-text {
            margin-bottom: 15px;
            line-height: 1.6; /* Improved readability */
            font-size: 15px; /* Standardized content font size */
            color: #333; /* Darker text for better contrast */
        }

        .post-image {
            width: 100%;
            border-radius: 8px;
            margin-bottom: 15px;
            max-height: 500px;
            object-fit: cover;
        }

        .post-video-container {
            position: relative;
            width: 100%;
            border-radius: 8px;
            margin-bottom: 15px;
            max-height: 500px;
            overflow: hidden;
            background-color: #1A1A1A;
        }

        .post-video {
            width: 100%;
            height: 100%;
            max-height: 500px;
            object-fit: cover;
        }

        /* Post Gallery Carousel Styles */
        .post-gallery-container {
            position: relative;
            width: 100%;
            overflow: hidden;
            border-radius: 8px; /* Match post-image */
            margin-bottom: 15px; /* Match post-image */
            background-color: #e0e0e0; /* Light background for aspect ratio consistency */
            aspect-ratio: 16 / 9; /* Default aspect ratio, adjust as needed */
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .post-gallery-inner {
            display: flex;
            height: 100%;
            transition: transform 0.3s ease-in-out;
        }
        .post-gallery-image {
            width: 100%; /* Each image takes full width of the container */
            height: 100%;
            object-fit: contain; /* Changed to contain to see full image, or cover if preferred */
            flex-shrink: 0; /* Prevent images from shrinking */
        }
        .gallery-nav {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background-color: rgba(0, 0, 0, 0.4);
            color: white;
            border: none;
            border-radius: 50%;
            width: 35px;
            height: 35px;
            font-size: 18px;
            cursor: pointer;
            z-index: 10;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0.7;
            transition: opacity 0.2s;
        }
        .gallery-nav:hover {
            opacity: 1;
        }
        .gallery-nav.prev {
            left: 10px;
        }
        .gallery-nav.next {
            right: 10px;
        }
        .gallery-dots {
            position: absolute;
            bottom: 10px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 5px;
            z-index: 10;
        }
        .gallery-dots .dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background-color: rgba(255, 255, 255, 0.5);
            cursor: pointer;
            transition: background-color 0.2s;
        }
        .gallery-dots .dot.active {
            background-color: white;
        }


        .video-mute-button {
            position: absolute;
            bottom: 10px;
            right: 10px;
            background-color: rgba(0, 0, 0, 0.5);
            color: white;
            border: none;
            border-radius: 50%;
            width: 30px;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            z-index: 5;
        }

        .post-stats {
            display: flex;
            justify-content: space-between;
            align-items: center; /* Vertically align items */
            padding: 12px 20px; /* Standardized padding */
            border-top: 1px solid #f0f0f0; /* Lighter border */
            border-bottom: 1px solid #f0f0f0; /* Lighter border */
            color: var(--gray-color);
            font-size: 13px; /* Slightly smaller for stats */
        }
        .post-stats .post-likes, .post-stats .post-comments {
            display: flex;
            align-items: center;
            gap: 6px; /* Space between icon and text */
        }


        .post-actions {
            display: flex;
            justify-content: flex-start; /* Align to the left */
            padding: 8px 15px; /* Keep padding */
            gap: 15px; /* Add space between action items */
        }

        .post-action {
            display: flex;
            align-items: center;
            color: var(--gray-color);
            cursor: pointer;
            padding: 8px 12px; /* Consistent padding */
            border-radius: 8px; /* Softer radius */
            transition: all 0.2s ease-in-out;
            font-size: 14px; /* Standardized font size */
            font-weight: 500; /* Slightly bolder */
        }

        .post-action:hover {
            background-color: rgba(var(--primary-color-rgb, 58, 134, 255), 0.08); /* Use RGB for opacity on primary */
            color: var(--primary-color);
        }
        /* Define --primary-color-rgb in :root if not already, e.g. --primary-color-rgb: 58, 134, 255; */


        .post-action i {
            margin-right: 6px; /* Adjusted spacing */
            font-size: 18px; /* Slightly larger icons */
        }

        .post-action.liked {
            color: var(--primary-color);
            font-weight: 600; /* Emphasize liked state */
        }
        .post-action.liked i {
            font-weight: 900; /* Solid icon for liked state if using FontAwesome Pro, or use fas */
        }


        /* Reels */
        .reels-container {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: calc(100vh - 60px);
            background-color: #1A1A1A;
            overflow-y: scroll;
            scroll-snap-type: y mandatory;
            -webkit-overflow-scrolling: touch;
            scroll-behavior: smooth;
            overscroll-behavior-y: contain;
            z-index: 1000;
            display: none;
            padding-bottom: 60px; /* Space for bottom nav if it's shown over reels */
        }
        .reels-header {
            position: sticky;
            top: 0;
            left: 0;
            width: 100%;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px 20px;
            background-color: rgba(0, 0, 0, 0.4);
            color: white;
            z-index: 1001;
        }
        .reels-header .back-btn, .reels-header .search-btn {
            background: none;
            border: none;
            color: white;
            font-size: 24px;
            cursor: pointer;
            padding: 5px;
        }


        .reel-item {
            width: 100%;
            height: calc(100vh - 60px);
            scroll-snap-align: start;
            scroll-snap-stop: always;
            position: relative;
            background-color: #1A1A1A;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .reel-video {
            width: 100%;
            height: 100%;
            object-fit: contain;
        }

        .reel-actions {
            position: absolute;
            right: 15px;
            bottom: 15px;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .reel-action {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin-bottom: 20px;
            color: white;
            text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
            cursor: pointer;
        }

        .reel-action i {
            font-size: 24px;
            margin-bottom: 5px;
        }

        .reel-action span {
            font-size: 12px;
        }

        .reel-action.liked i {
            color: var(--primary-color);
        }

        .reel-user {
            position: absolute;
            bottom: 15px;
            left: 15px;
            display: flex;
            align-items: center;
            color: white;
            text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
        }
        .reel-user .follow-button {
            margin-left: 10px;
            padding: 4px 8px;
            font-size: 12px;
            border-radius: 5px;
            border: 1px solid white;
            background-color: rgba(255, 255, 255, 0.2);
            color: white;
            cursor: pointer;
            transition: all 0.2s ease-in-out;
        }
        .reel-user .follow-button.following {
            background-color: transparent;
        }

        .reel-user img {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            object-fit: cover;
            margin-right: 10px;
            border: 2px solid white;
        }

        .close-reels {
            position: fixed;
            top: 20px;
            right: 20px;
            color: white;
            font-size: 24px;
            z-index: 1001;
            cursor: pointer;
        }

        /* Notifications */
        .notification-item {
            background-color: white;
            border-radius: 10px;
            padding: 15px;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            cursor: pointer;
            transition: all 0.3s;
        }

        .notification-item:hover {
            background-color: rgba(58, 134, 255, 0.05);
        }

        .notification-item img {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            object-fit: cover;
            margin-right: 15px;
        }

        .notification-content {
            flex: 1;
        }

        .notification-content p {
            margin-bottom: 5px;
        }

        .notification-time {
            font-size: 12px;
            color: var(--gray-color);
        }

        .notification-unread {
            background-color: rgba(58, 134, 255, 0.1);
        }

        /* Messages */
        .message-section {
            background-color: white;
            border-radius: 10px;
            padding: 15px;
            margin-bottom: 20px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
        }

        .message-section-title {
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 15px;
            color: var(--primary-color);
        }

        .message-item {
            background-color: white;
            border-radius: 10px;
            padding: 15px;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            cursor: pointer;
            transition: all 0.3s;
        }

        .message-item:hover {
            background-color: rgba(58, 134, 255, 0.05);
        }

        .message-item img {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            object-fit: cover;
            margin-right: 15px;
        }

        .message-content {
            flex: 1;
        }

        .message-content h4 {
            margin-bottom: 5px;
            display: flex;
            align-items: center;
        }

        .message-preview {
            color: var(--gray-color);
            font-size: 14px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 200px;
        }

        .message-time {
            font-size: 12px;
            color: var(--gray-color);
        }

        .message-unread {
            font-weight: bold;
        }

        /* Message Filters */
        .message-filters {
            display: flex;
            justify-content: space-around;
            margin-bottom: 20px;
            background-color: white;
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
            padding: 10px;
        }
        .message-filter-btn {
            flex: 1;
            padding: 10px 15px;
            border: none;
            background-color: transparent;
            color: var(--gray-color);
            font-weight: 600;
            cursor: pointer;
            border-radius: 8px;
            transition: all 0.3s;
        }
        .message-filter-btn { /* Default outlined style */
            flex: 1;
            padding: 10px 15px;
            border: 1px solid var(--primary-color); /* Outline with primary color */
            background-color: transparent; /* Transparent background */
            color: var(--primary-color); /* Text color primary */
            font-weight: 600;
            cursor: pointer;
            border-radius: 8px;
            transition: all 0.3s;
            margin: 0 5px; /* Add small margin between buttons */
        }
        .message-filter-btn:first-child {
            margin-left: 0;
        }
        .message-filter-btn:last-child {
            margin-right: 0;
        }

        .message-filter-btn.active { /* Active filled style */
            background-color: var(--primary-color);
            color: white;
            border-color: var(--primary-color); /* Ensure border color remains consistent or not needed */
        }
        .message-filter-btn:hover:not(.active) { /* Hover for inactive outlined buttons */
            background-color: rgba(var(--primary-color-rgb), 0.08); /* Subtle primary background tint */
            /* color: var(--primary-color); /* Already primary color */
        }
        .message-filter-btn:hover.active { /* Hover for active button - can make it slightly darker if needed */
            background-color: #0056b3; /* Darker shade of primary */
            border-color: #0056b3;
        }


        /* Chat Modal - Full Screen */
        .chat-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            justify-content: center;
            align-items: center;
        }

        .chat-modal-content {
            background-color: white;
            border-radius: 0;
            width: 100%;
            max-width: 100%;
            height: 100%;
            max-height: 100%;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .chat-header {
            display: flex;
            align-items: center;
            padding: 15px;
            border-bottom: 1px solid #eee;
            background-color: var(--light-color);
        }

        .chat-header img {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            object-fit: cover;
            margin-right: 10px;
        }

        .chat-header h4 {
            flex-grow: 1;
            font-weight: 600;
            display: flex;
            align-items: center;
        }
        .chat-header .online-status {
            font-size: 12px;
            color: var(--gray-color);
            margin-left: 10px;
        }
        .chat-header .online-status.online {
            color: var(--success-color);
            font-weight: 600;
        }


        .close-chat-modal {
            background: none;
            border: none;
            font-size: 20px;
            cursor: pointer;
            color: var(--gray-color);
        }

        .chat-messages {
            flex-grow: 1;
            padding: 15px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
        }

        .message-bubble {
            max-width: 70%;
            padding: 10px 15px;
            border-radius: 15px;
            margin-bottom: 10px;
            line-height: 1.5; /* Improved line height */
            position: relative;
            font-size: 15px; /* Standardize bubble text size */
        }

        .message-bubble.sent {
            background-color: var(--primary-color);
            color: white;
            align-self: flex-end;
            border-radius: 18px 18px 4px 18px; /* Modern bubble shape */
        }

        .message-bubble.received {
            background-color: #e9ecef; /* Lighter gray for received */
            color: var(--dark-color);
            align-self: flex-start;
            border-radius: 18px 18px 18px 4px; /* Modern bubble shape */
        }

        .message-bubble img,
        .message-bubble video { /* Combined styling for media within bubbles */
            max-width: 100%;
            border-radius: 10px;
            margin-top: 8px;
            display: block; /* Ensure they take block space if needed */
        }
        /* Ensure video controls are visible if it's a video tag directly */
        .message-bubble video {
            /* controls: auto; /* This is an HTML attribute, not CSS. JS should add it if needed */
        }


        .message-bubble span.timestamp { /* More specific selector for timestamp */
            display: block;
            font-size: 10px; /* Even smaller timestamp */
            color: rgba(255, 255, 255, 0.7); /* Lighter for sent */
            margin-top: 8px; /* More space from content */
            text-align: right;
        }
        .message-bubble.received span.timestamp {
            color: #888; /* Lighter gray for received timestamp */
            text-align: left;
        }
        /* Add a class to the timestamp span in renderMessage JS if not already there */

        .chat-message-options {
            position: absolute;
            top: 5px;
            right: 5px;
            color: white;
            cursor: pointer;
            font-size: 14px;
            padding: 5px;
            border-radius: 50%;
            background-color: rgba(0,0,0,0.2);
        }
        .message-bubble.received .chat-message-options {
            left: 5px;
            right: auto;
            color: var(--gray-color);
            background-color: rgba(0,0,0,0.05);
        }

        .chat-message-options-dropdown {
            position: absolute;
            top: 25px;
            right: 0;
            background-color: white;
            border-radius: 5px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            z-index: 10;
            min-width: 100px;
            display: none;
        }
        .message-bubble.received .chat-message-options-dropdown {
            left: 0;
            right: auto;
        }

        .chat-message-options-dropdown button {
            display: block;
            width: 100%;
            padding: 8px 12px;
            text-align: left;
            background: none;
            border: none;
            cursor: pointer;
            font-size: 13px;
            color: var(--dark-color);
        }
        .chat-message-options-dropdown button:hover {
            background-color: #f0f0f0;
        }
        .chat-message-options-dropdown button.delete-btn {
            color: var(--danger-color);
        }


        .chat-input {
            padding: 15px;
            border-top: 1px solid #eee;
            display: flex;
            align-items: center;
            background-color: var(--light-color);
        }

        .chat-input input {
            flex-grow: 1;
            padding: 10px 15px;
            border: 1px solid #ddd;
            border-radius: 20px;
            outline: none;
            margin-right: 10px;
        }

        /* Chat Input Area Modernization */
        .chat-input {
            padding: 10px 15px; /* Slightly reduced padding */
            border-top: 1px solid #e0e0e0; /* Lighter border */
            display: flex;
            align-items: center;
            background-color: #f8f9fa; /* Light background for input area */
            gap: 10px; /* Gap between elements */
        }

        .chat-input input[type="text"] { /* More specific selector */
            flex-grow: 1;
            padding: 10px 15px;
            border: 1px solid #ddd;
            border-radius: 20px; /* Keep rounded for chat input */
            outline: none;
            /* margin-right: 10px; /* Replaced by gap */
            font-size: 15px;
        }
        .chat-input input[type="text"]:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.2);
        }


        .chat-action-btn { /* For image upload, voice note etc. */
            background: transparent; /* Fully transparent */
            border: none;
            font-size: 22px; /* Slightly larger icon */
            color: var(--primary-color); /* Use primary color for action icons */
            cursor: pointer;
            padding: 8px; /* Make it a bit bigger touch target */
            border-radius: 50%;
            transition: background-color 0.2s, color 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .chat-action-btn:hover {
            background-color: rgba(var(--primary-color-rgb), 0.1); /* Subtle primary hover */
        }
        .chat-action-btn.recording { /* Example for a recording state */
            color: var(--danger-color);
        }

        #chatSendButton { /* Specific styling for send button */
            background-color: var(--primary-color);
            color: white;
            border: none;
            border-radius: 20px; /* Match input field's roundness */
            padding: 10px 18px; /* Good padding */
            cursor: pointer;
            font-weight: 600;
            font-size: 15px;
            transition: background-color 0.2s;
        }
        #chatSendButton:hover {
            background-color: #0056b3; /* Darker primary on hover */
        }
        #chatSendButton:disabled { /* Style for disabled send button */
            background-color: var(--gray-color);
            cursor: not-allowed;
        }


        #chatMediaPreviewContainer {
            color: var(--danger-color);
        }
        #chatMediaPreviewContainer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            background-color: #f0f0f0;
            padding: 10px;
            border-radius: 8px;
            margin: 10px 15px;
        }
        #chatMediaPreviewContainer audio {
            width: calc(100% - 40px);
        }
        #chatMediaPreviewContainer img {
            max-width: 80px;
            max-height: 80px;
            object-fit: contain;
            border-radius: 5px;
        }


        /* Profile Modernization */
        .profile-header {
            background-color: #ffffff; /* Keep it white and clean */
            border-radius: 12px; /* Slightly softer radius */
            margin-bottom: 25px; /* More spacing */
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06); /* Softer shadow */
            padding: 25px; /* Increased padding */
            border-top: 4px solid var(--primary-color); /* Accent color border */
        }

        .profile-info {
            display: flex;
            align-items: center; /* Align items vertically for better look */
            flex-wrap: wrap; /* Keep wrap for responsiveness */
        }

        .profile-avatar {
            width: 100px; /* Slightly reduced for a sleeker look */
            height: 100px;
            border-radius: 50%;
            object-fit: cover;
            border: 4px solid var(--light-color); /* Lighter border, or primary for accent */
            /* margin-top: -60px; /* Removed, as header has padding now */
            margin-right: 25px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        }

        .profile-details {
            flex: 1;
            min-width: 0; /* Prevent overflow issues */
        }

        .profile-name {
            font-size: 26px; /* Larger name */
            font-weight: 700; /* Bolder */
            margin-bottom: 8px; /* More space */
            display: flex;
            align-items: center;
            color: var(--dark-color);
        }
        .profile-name .verified-badge { /* Ensure badge aligns well */
            font-size: 20px;
            margin-left: 8px;
        }

        .profile-title { /* User's job title or tagline */
            color: var(--secondary-color); /* Use accent color */
            font-size: 15px;
            font-weight: 500;
            margin-bottom: 12px;
        }

        .profile-bio {
            margin-bottom: 20px; /* More space */
            line-height: 1.6;
            font-size: 14px;
            color: #555; /* Slightly lighter than main text */
        }

        .profile-stats {
            display: flex;
            gap: 25px; /* Increased gap */
            margin-bottom: 25px;
            flex-wrap: wrap;
            padding-top: 15px;
            border-top: 1px solid #eee; /* Separator */
        }

        .profile-stat {
            display: flex;
            flex-direction: column;
            align-items: center; /* Center stat items */
            text-align: center;
        }

        .stat-number {
            font-weight: 600;
            font-size: 20px; /* Larger stat numbers */
            color: var(--primary-color); /* Accent color for numbers */
            cursor: pointer;
        }

        .stat-label {
            font-size: 13px; /* Slightly larger label */
            color: var(--gray-color);
            margin-top: 4px; /* Space between number and label */
            cursor: pointer;
        }

        .profile-actions {
            display: flex;
            gap: 12px; /* Slightly more gap */
            flex-wrap: wrap;
            margin-top: 10px; /* Add some space above actions if stats are present */
        }

        .profile-btn { /* General styling for all profile buttons */
            padding: 10px 18px; /* Increased padding */
            border-radius: 8px; /* Softer radius */
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease-in-out;
            border: 1px solid transparent; /* Base for consistent sizing */
            font-size: 14px;
            text-align: center;
        }

        /* Specific styles for primary and secondary buttons */
        .profile-btn.primary-btn {
            background-color: var(--primary-color);
            color: white;
            border-color: var(--primary-color);
        }
        .profile-btn.primary-btn:hover {
            background-color: #0056b3; /* Darker shade or from var */
            border-color: #0056b3;
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(var(--primary-color-rgb), 0.2);
        }

        .profile-btn.secondary-btn {
            background-color: transparent;
            color: var(--dark-color); /* Darker text for better contrast */
            border: 1px solid #ccc; /* Clearer border */
        }
        .profile-btn.secondary-btn:hover {
            background-color: #f8f9fa; /* Subtle hover background */
            border-color: #bbb;
            color: var(--primary-color);
            transform: translateY(-1px);
        }
        .profile-btn.secondary-btn i { /* Icon color for secondary buttons */
            margin-right: 6px;
        }


        .profile-tabs {
            display: flex;
            border-bottom: 1px solid #e0e0e0; /* Slightly darker border */
            margin-bottom: 25px; /* More space below tabs */
            overflow-x: auto;
            white-space: nowrap;
        }

        .profile-tab {
            flex-shrink: 0;
            padding: 12px 20px; /* Increased padding */
            cursor: pointer;
            font-weight: 600;
            color: var(--gray-color);
            border-bottom: 3px solid transparent; /* Thicker indicator line */
            transition: all 0.2s ease-in-out;
            margin-right: 10px; /* Space between tabs */
            font-size: 15px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .profile-tab:hover {
            color: var(--dark-color);
            background-color: rgba(var(--primary-color-rgb), 0.05);
        }

        .profile-tab.active {
            color: var(--primary-color);
            border-bottom-color: var(--primary-color);
        }
        .profile-tab i { /* For icons in tabs */
            font-size: 16px;
        }


        .profile-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
            gap: 10px;
        }
        .profile-grid-item {
            position: relative;
            width: 100%;
            padding-top: 100%;
            background-color: #1A1A1A;
            border-radius: 8px;
            overflow: hidden;
            cursor: pointer;
        }
        .profile-grid-item video, .profile-grid-item img {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        /* User List Page (Followers/Following) */
        .user-list-page {
            background-color: white;
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
            padding: 20px;
            margin-bottom: 20px;
        }
        .user-list-page h2 {
            font-size: 20px;
            margin-bottom: 20px;
            color: var(--primary-color);
            text-align: center;
        }
        .user-list-item {
            display: flex;
            align-items: center;
            padding: 10px 0;
            border-bottom: 1px solid #eee;
            cursor: pointer;
            transition: background-color 0.2s;
        }
        .user-list-item:last-child {
            border-bottom: none;
        }
        .user-list-item:hover {
            background-color: #f8f9fa;
        }
        .user-list-item img {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            object-fit: cover;
            margin-right: 15px;
        }
        .user-list-info {
            flex-grow: 1;
        }
        .user-list-info h4 {
            font-size: 16px;
            margin-bottom: 5px;
            display: flex;
            align-items: center;
        }
        .user-list-info p {
            font-size: 13px;
            color: var(--gray-color);
        }


        /* Bottom Navigation - Mobile */
        .bottom-nav {
            position: fixed;
            bottom: 0;
            left: 0;
            width: 100%;
            background-color: white;
            display: flex;
            justify-content: space-around;
            align-items: center;
            padding: 10px 0;
            box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
            z-index: 1000;
            height: 60px;
            box-sizing: border-box;
            /* transition: none; /* Explicitly no transition */
        }

        .nav-icon {
            display: flex;
            flex-direction: column;
            align-items: center;
            color: var(--gray-color);
            text-decoration: none;
            font-size: 12px;
        }

        .nav-icon i {
            font-size: 20px;
            margin-bottom: 5px;
        }

        .nav-icon.active {
            color: var(--primary-color);
        }

        .plus-button {
            background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
            color: white;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            margin-top: -25px;
            box-shadow: 0 5px 15px rgba(58, 134, 255, 0.3);
        }

        /* Create Post Modal - Full Screen */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            justify-content: center;
            align-items: center;
        }

        .modal-content {
            background-color: white;
            border-radius: 0;
            width: 100%;
            max-width: 100%;
            max-height: 100%;
            height: 100%;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
        }

        /* Comments Modal Specific Styling */
        #commentModal .modal-content {
            width: 100%;
            max-width: 600px;
            height: 80vh;
            position: absolute;
            bottom: 0;
            border-bottom-left-radius: 0;
            border-bottom-right-radius: 0;
            box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
        }

        /* Settings Modal Specific Styling */
        #settingsModal .modal-content { /* This is for the main settings page (not a modal anymore) */
            width: 100%; /* Take full width of its .feed container */
            max-width: none;
            height: auto;
            min-height: auto;
            border-radius: 0;
            padding: 0; /* Padding will be on .message-section */
            text-align: left;
            box-shadow: none;
            background-color: transparent; /* Let .feed or body background show */
        }
         /* New Settings Buttons CSS */
        .settings-btn {
            display: flex;
            align-items: center;
            width: 100%;
            text-align: left;
            padding: 15px; /* Increased padding */
            margin-bottom: 10px;
            background-color: white; /* White background for buttons */
            border: 1px solid #eee; /* Subtle border */
            border-radius: 8px;
            cursor: pointer;
            transition: background-color 0.3s, box-shadow 0.3s;
            font-size: 16px;
            font-weight: 500;
            color: var(--dark-color);
            box-shadow: 0 1px 3px rgba(0,0,0,0.05);
        }
        .settings-btn i {
            margin-right: 15px; /* Increased margin */
            color: var(--primary-color);
            width: 20px;
            text-align: center;
            font-size: 18px; /* Slightly larger icon */
        }
        .settings-btn:hover {
            background-color: #f8f9fa;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        }
        .settings-btn.danger {
            color: var(--danger-color);
        }
        .settings-btn.danger i {
            color: var(--danger-color);
        }
        .settings-btn.danger:hover {
            background-color: rgba(220, 53, 69, 0.05); /* Lighter red hover */
        }


        /* Account Settings Modal Specific Styling - Full Screen */
        #accountSettingsModal .modal-content {
            width: 100%; /* Full width */
            max-width: 100%; /* Full width */
            height: 100%; /* Full height */
            max-height: 100%; /* Full height */
            border-radius: 0; /* No border radius for full screen */
            /* padding: 20px; /* Padding will be applied to modal-body if needed, or kept here */
            text-align: left; /* Align text to left for typical settings page */
            overflow-y: auto; /* Allow scrolling if content exceeds height */
            display: flex; /* Added to make modal-body flex-grow */
            flex-direction: column; /* Stack header and body */
        }
        #accountSettingsModal .modal-header { /* Ensure header is part of the column flow */
            flex-shrink: 0;
        }
        #accountSettingsModal .modal-body { /* Make body scrollable and take remaining space */
            flex-grow: 1;
            overflow-y: auto;
            padding: 20px; /* Add padding here if removed from .modal-content */
        }

        #accountSettingsModal .profile-summary {
            display: flex;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 20px;
            border-bottom: 1px solid #eee;
        }
        #accountSettingsModal .profile-summary img {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            object-fit: cover;
            margin-right: 15px;
        }
        #accountSettingsModal .profile-summary div {
            text-align: left;
        }
        #accountSettingsModal .profile-summary h4 {
            font-size: 18px;
            margin-bottom: 5px;
        }
        #accountSettingsModal .profile-summary p {
            font-size: 14px;
            color: var(--gray-color);
        }
        #accountSettingsModal .security-option,
        #accountSettingsModal .setting-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 0;
            border-bottom: 1px solid #eee;
            font-size: 15px;
            cursor: pointer;
        }
        #accountSettingsModal .security-option:last-child,
        #accountSettingsModal .setting-item:last-child {
            border-bottom: none;
        }
        #accountSettingsModal .security-option i,
        #accountSettingsModal .setting-item i {
            margin-left: 10px;
            color: var(--gray-color);
        }
        #accountSettingsModal .toggle-switch {
            position: relative;
            display: inline-block;
            width: 40px;
            height: 24px;
        }
        #accountSettingsModal .toggle-switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }
        #accountSettingsModal .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #ccc;
            -webkit-transition: .4s;
            transition: .4s;
            border-radius: 24px;
        }
        #accountSettingsModal .slider:before {
            position: absolute;
            content: "";
            height: 16px;
            width: 16px;
            left: 4px;
            bottom: 4px;
            background-color: white;
            -webkit-transition: .4s;
            transition: .4s;
            border-radius: 50%;
        }
        #accountSettingsModal input:checked + .slider {
            background-color: var(--primary-color);
        }
        #accountSettingsModal input:focus + .slider {
            box-shadow: 0 0 1px var(--primary-color);
        }
        #accountSettingsModal input:checked + .slider:before {
            -webkit-transform: translateX(16px);
            -ms-transform: translateX(16px);
            transform: translateX(16px);
        }

        /* Verification Modal Styling */
        #verificationModal .modal-content {
            width: 90%;
            max-width: 500px;
            height: auto;
            min-height: 200px;
            border-radius: 10px;
            padding: 20px;
            text-align: center;
        }
        #verificationModal .eligibility-status {
            margin-bottom: 20px;
            font-size: 16px;
        }
        #verificationModal .eligibility-status.eligible {
            color: var(--success-color);
        }
        #verificationModal .eligibility-status.not-eligible {
            color: var(--danger-color);
        }
        #verificationModal .payment-info {
            margin-top: 20px;
            font-size: 18px;
            font-weight: 600;
            color: var(--primary-color);
        }
        #verificationModal .payment-btn {
            background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
            color: white;
            border: none;
            border-radius: 5px;
            padding: 12px 20px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            margin-top: 20px;
            width: 100%;
        }
        #verificationModal .payment-btn:hover {
            opacity: 0.9;
            transform: translateY(-2px);
        }


        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px;
            border-bottom: 1px solid #eee;
        }

        .modal-title {
            font-weight: 600;
        }

        .close-modal {
            background: none;
            border: none;
            font-size: 20px;
            cursor: pointer;
            color: var(--gray-color);
        }

        .modal-body {
            padding: 15px;
            flex-grow: 1;
            display: flex;
            flex-direction: column;
        }

        .post-form {
            display: flex;
            flex-direction: column;
            flex-grow: 1;
        }

        .post-form textarea {
            width: 100%;
            border: none;
            outline: none;
            resize: none;
            min-height: 100px;
            font-size: 16px;
            margin-bottom: 15px;
            flex-grow: 1;
        }

        .post-options-bar {
            display: flex;
            justify-content: space-between;
            border-top: 1px solid #eee;
            border-bottom: 1px solid #eee;
            padding: 10px 0;
            margin-bottom: 15px;
        }

        .add-to-post {
            display: flex;
            gap: 15px;
        }

        .add-option {
            display: flex;
            align-items: center;
            color: var(--gray-color);
            cursor: pointer;
        }

        .add-option i {
            margin-right: 5px;
        }

        .post-submit-btn {
            background-color: var(--primary-color);
            color: white;
            border: none;
            border-radius: 5px;
            padding: 8px 15px;
            font-weight: 600;
            cursor: pointer;
            opacity: 0.5;
            transition: all 0.3s;
        }

        .post-submit-btn.active {
            opacity: 1;
        }

        .preview-container {
            margin-bottom: 15px;
            position: relative;
        }

        .preview-image {
            width: 100%;
            border-radius: 8px;
            max-height: 300px;
            object-fit: contain;
            background-color: #f5f5f5;
        }

        .preview-video {
            width: 100%;
            border-radius: 8px;
            max-height: 300px;
            background-color: #1A1A1A;
        }

        .remove-preview {
            position: absolute;
            top: 10px;
            right: 10px;
            background-color: rgba(0, 0, 0, 0.5);
            color: white;
            border: none;
            border-radius: 50%;
            width: 30px;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
        }

        /* Explore Page */
        .explore-tabs {
            display: flex;
            border-bottom: 1px solid #eee;
            margin-bottom: 20px;
        }

        .explore-tab {
            padding: 10px 20px;
            cursor: pointer;
            font-weight: 600;
            color: var(--gray-color);
            border-bottom: 2px solid transparent;
            transition: all 0.3s;
            display: flex;
            align-items: center;
        }
        .explore-tab i {
            margin-right: 0;
            font-size: 18px;
        }


        .explore-tab.active {
            color: var(--primary-color);
            border-bottom-color: var(--primary-color);
        }

        .stories-container {
            display: flex;
            gap: 15px;
            margin-bottom: 20px;
            overflow-x: auto;
            padding-bottom: 10px; /* Keep some padding for visual separation if needed */
            /* Added new story styles below, this might be overridden or complemented */
            scroll-snap-type: x mandatory;
            scrollbar-width: none; /* Firefox */
        }
        .stories-container::-webkit-scrollbar {
            display: none; /* Chrome, Safari */
        }


        .story-item { /* This is the old .story-item, will be replaced by .story */
            /* Styles from .story-item will be merged or replaced by .story specific styles */
            min-width: auto; /* Reset from old value */
            text-align: center;
            cursor: pointer;
            /* New styles from .story will take precedence */
            flex: 0 0 auto;
            display: flex;
            flex-direction: column;
            align-items: center;
            scroll-snap-align: start;
        }

        .story-item.add-story { /* Keep add-story specific styling */
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            border: 2px dashed var(--gray-color);
            border-radius: 10px; /* Keep or adjust if new .story has different radius */
            padding: 10px;
            min-height: 120px; /* Or adjust to match new story height + padding */
            color: var(--gray-color);
            font-weight: 600;
            font-size: 14px;
            width: 80px; /* Match new story image width */
            height: auto; /* Let content define height */
            margin-right: 12px; /* Match gap */
        }
        .story-item.add-story img { /* If add story uses an img, it won't exist */
             /* No specific img style for add-story button from new CSS */
        }
        .story-item.add-story i {
            font-size: 30px;
            margin-bottom: 5px;
        }
        .story-item.add-story span {
            /* font-size: 12px; /* from new .story span */
            /* color: #333; /* from new .story span */
            /* margin-top: 5px; /* from new .story span */
        }


        .story-avatar { /* This selector might become story-item > img or .story > img */
            /* width: 70px; /* Old size */
            /* height: 70px; /* Old size */
            width: 80px; /* New size from .story img */
            height: 80px; /* New size from .story img */
            object-fit: cover;
            border-radius: 50%;
            /* border: 2px solid var(--primary-color); /* Old border */
            border: 3px solid #f23645; /* New border from .story img */
            padding: 2px;
            background: white; /* New from .story img */
            margin-bottom: 5px; /* Old spacing, new is margin-top on span */
        }
        .story-avatar.viewed { /* Keep this modifier */
            border-color: var(--gray-color); /* Or use a less prominent color than #f23645 */
        }
        .story-avatar.my-story-avatar { /* Keep this modifier */
            border-color: var(--success-color); /* Or a different brand color for "my story" */
            border-width: 3px;
        }


        .story-username { /* This selector might become story-item > span or .story > span */
            /* font-size: 12px; /* Old size, matches new */
            /* white-space: nowrap; /* Old, useful */
            /* overflow: hidden; /* Old, useful */
            /* text-overflow: ellipsis; /* Old, useful */
            /* max-width: 100px; /* Old, might need adjustment based on 80px image */
            margin-top: 5px; /* New from .story span */
            font-size: 12px; /* New from .story span */
            color: #333; /* New from .story span */
            max-width: 80px; /* To match image width */
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        /* Renaming .stories-container to .story-container for direct application of new styles */
        /* All .story-item will become .story for direct application of new styles */
        /* The JS function renderStoryItem will need to use class 'story' instead of 'story-item' */
        /* and its child img will get .story-avatar styles, and child p will get .story-username styles */

        /* New Story CSS from user - to be integrated */
        .story-container { /* This will be the new .stories-container */
          display: flex;
          overflow-x: auto;
          gap: 12px;
          padding: 10px;
          scroll-snap-type: x mandatory;
          scrollbar-width: none; /* Firefox */
        }
        .story-container::-webkit-scrollbar {
          display: none; /* Chrome, Safari */
        }

        .story { /* This will be the new .story-item */
          flex: 0 0 auto;
          display: flex;
          flex-direction: column;
          align-items: center;
          scroll-snap-align: start;
          cursor: pointer; /* Added from old .story-item */
          text-align: center; /* Added from old .story-item */
        }

        .story img { /* This will be the new .story-avatar */
          width: 80px;
          height: 80px;
          object-fit: cover;
          border-radius: 50%;
          border: 3px solid #f23645; /* or your brand color */
          padding: 2px;
          background: white;
        }

        .story span { /* This will be the new .story-username */
          margin-top: 5px;
          font-size: 12px;
          color: #333;
          max-width: 80px; /* Added for consistency */
          white-space: nowrap; /* Added from old .story-username */
          overflow: hidden; /* Added from old .story-username */
          text-overflow: ellipsis; /* Added from old .story-username */
        }
        /* End of new story CSS integration */


        /* Story Preview Modal */
        .story-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: black;
            z-index: 1001;
            justify-content: center;
            align-items: center;
            color: white;
        }

        .story-modal-content {
            width: 100%;
            height: 100%;
            position: relative;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }

        .story-media {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
        }

        .story-user-info {
            position: absolute;
            top: 20px;
            left: 20px;
            display: flex;
            align-items: center;
            background-color: rgba(0, 0, 0, 0.4);
            padding: 8px 12px;
            border-radius: 20px;
        }

        .story-user-info img {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            margin-right: 10px;
        }

        .story-user-info span {
            font-weight: 600;
            display: flex;
            align-items: center;
        }

        .story-actions-bottom {
            position: absolute;
            bottom: 20px;
            width: 90%;
            max-width: 400px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .story-actions-bottom input {
            flex-grow: 1;
            padding: 10px 15px;
            border-radius: 20px;
            border: 1px solid rgba(255, 255, 255, 0.5);
            background-color: rgba(0, 0, 0, 0.5);
            color: white;
            outline: none;
        }

        .story-actions-bottom input::placeholder {
            color: rgba(255, 255, 255, 0.7);
        }

        .story-actions-bottom button {
            background: none;
            border: none;
            color: white;
            font-size: 24px;
            cursor: pointer;
        }
        .story-actions-bottom button.liked {
            color: var(--danger-color);
        }

        .close-story-modal {
            position: absolute;
            top: 20px;
            right: 20px;
            color: white;
            font-size: 24px;
            cursor: pointer;
        }

        .story-nav-arrow {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            font-size: 40px;
            color: rgba(255, 255, 255, 0.7);
            cursor: pointer;
            z-index: 1002;
            padding: 10px;
            transition: color 0.3s;
        }
        .story-nav-arrow:hover {
            color: white;
        }
        #prevStoryBtn {
            left: 10px;
        }
        #nextStoryBtn {
            right: 10px;
        }


        .verified-badge {
            color: var(--secondary-color); /* Purple color for the badge */
            font-size: 14px; /* Adjusted size if needed, 14px is probably fine */
            margin-left: 5px;
        }
        .verified-badge i.fa-check { /* Specifically target the check icon if needed */
             /* Potentially add more specific styles for fa-check if it looks too small/large */
        }


        /* Tags and Location input styling */
        .tag-input-container, .location-input-container {
            margin-bottom: 15px;
        }

        .tag-input-container input, .location-input-container input {
            width: 100%;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 5px;
            font-size: 14px;
        }

        .tags-display {
            margin-top: 5px;
            display: flex;
            flex-wrap: wrap;
            gap: 5px;
        }

        .tag-item {
            background-color: var(--primary-color);
            color: white;
            padding: 5px 10px;
            border-radius: 15px;
            font-size: 12px;
            display: flex;
            align-items: center;
        }

        .tag-item .remove-tag {
            margin-left: 5px;
            cursor: pointer;
            font-size: 10px;
        }

        .visibility-options {
            margin-bottom: 15px;
        }

        .visibility-options label {
            margin-right: 15px;
            font-size: 14px;
            color: var(--gray-color);
        }

        .visibility-options select {
            padding: 8px 10px;
            border: 1px solid #ddd;
            border-radius: 5px;
            font-size: 14px;
            background-color: white;
        }

        /* Explore Reels Grid */
        .explore-reels-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            gap: 15px;
            padding-bottom: 10px;
        }
        .explore-reel-item {
            width: 100%;
            height: 250px;
            background-color: #1A1A1A;
            border-radius: 10px;
            overflow: hidden;
            position: relative;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            cursor: pointer;
        }
        .explore-reel-item video {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .explore-reel-item .reel-user-info {
            position: absolute;
            bottom: 10px;
            left: 10px;
            color: white;
            font-size: 12px;
            text-shadow: 0 1px 3px rgba(0,0,0,0.5);
            display: flex;
            align-items: center;
        }
        .explore-reel-item .reel-user-info img {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            margin-right: 5px;
            border: 1px solid white;
        }
        @media (min-width: 600px) {
            .explore-reels-grid {
                grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
            }
        }
        @media (min-width: 992px) {
            .explore-reels-grid {
                grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            }
        }

        /* Edit Profile Modal */
        #editProfileModal .modal-content {
            width: 90%;
            max-width: 500px;
            height: auto;
            min-height: 300px;
            border-radius: 10px;
            position: relative;
        }

        #editProfileModal .edit-profile-step {
            display: none;
            padding: 20px;
            text-align: center;
        }
        #editProfileModal .edit-profile-step.active {
            display: block;
        }
        #editProfileModal .edit-profile-step h3 {
            margin-bottom: 20px;
            color: var(--primary-color);
        }
        #editProfileModal .edit-profile-step input[type="text"],
        #editProfileModal .edit-profile-step textarea {
            width: 100%;
            padding: 10px;
            margin-bottom: 15px;
            border: 1px solid #ddd;
            border-radius: 5px;
            font-size: 16px;
            resize: vertical;
            min-height: 80px;
        }
        #editProfileModal .edit-profile-step .profile-pic-preview {
            width: 150px;
            height: 150px;
            border-radius: 50%;
            object-fit: cover;
            margin: 0 auto 20px;
            border: 3px solid var(--primary-color);
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        #editProfileModal .edit-profile-step .btn-group {
            display: flex;
            justify-content: space-around;
            gap: 10px;
            margin-top: 20px;
        }
        #editProfileModal .edit-profile-step .btn-group button {
            flex: 1;
            padding: 10px 15px;
            border-radius: 5px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
        }

        /* Share Modal */
        #shareModal .modal-content {
            width: 90%;
            max-width: 400px;
            border-radius: 10px;
            padding: 20px;
            text-align: center;
        }
        #shareModal .share-options button {
            display: block;
            width: 100%;
            padding: 12px;
            margin-bottom: 10px;
            border: 1px solid var(--primary-color);
            border-radius: 5px;
            background-color: white;
            color: var(--primary-color);
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
        }
        #shareModal .share-options button:hover {
            background-color: var(--primary-color);
            color: white;
        }
        #shareModal .share-options button i {
            margin-right: 10px;
        }

        /* Notification Toast Styles */
        .notification-toast {
            position: fixed;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            padding: 12px 20px;
            border-radius: 8px;
            color: white;
            z-index: 2000;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
        }
        .notification-toast.show {
            opacity: 1;
            visibility: visible;
            transform: translate(-50%, -10px);
        }
        .notification-toast.success { background-color: var(--success-color); }
        .notification-toast.error { background-color: var(--danger-color); }
        .notification-toast.info { background-color: var(--primary-color); }


        /* General Loading Spinner */
        .loading-spinner-container {
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 20px;
            width: 100%;
        }
        .loading-spinner {
            border: 4px solid rgba(0, 0, 0, 0.1); /* Lighter border for light backgrounds */
            border-left-color: var(--primary-color); /* Use primary color for active part */
            border-radius: 50%;
            width: 36px;
            height: 36px;
            animation: spin 1s linear infinite; /* Reuse existing spin animation */
        }
        /* @keyframes spin is already globally defined */

        /* New Grid/Dot Loader */
        .loader {
          width: 50px; /* Or adjust as needed */
          aspect-ratio: 1;
          display: grid;
          margin: auto; /* For centering if its container is not flex centering it */
        }
        .loader::before,
        .loader::after {
          content:"";
          grid-area: 1/1;
          /* --c:no-repeat radial-gradient(farthest-side,#25b09b 92%,#0000); /* Original color */
          --c:no-repeat radial-gradient(farthest-side,#000000 92%,#0000); /* Changed to black */
          background:
            var(--c) 50%  0,
            var(--c) 50%  100%,
            var(--c) 100% 50%,
            var(--c) 0    50%;
          background-size: 12px 12px;
          animation: l12 1s infinite;
        }
        .loader::before {
          margin: 4px;
          filter: hue-rotate(45deg); /* This will make the black dots appear slightly different due to filter, or remove if pure black is needed */
          background-size: 8px 8px;
          animation-timing-function: linear;
        }

        @keyframes l12 {
          100%{transform: rotate(.5turn)}
        }
        /* End New Grid/Dot Loader */


        /* Confirmation Modal Styles */
        .confirm-modal {
            display: none;
            position: fixed;
            z-index: 2000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            overflow: auto;
            background-color: rgba(0,0,0,0.6);
            justify-content: center;
            align-items: center;
        }
        .confirm-modal-content {
            background-color: #fefefe;
            padding: 20px;
            border: 1px solid #888;
            width: 90%;
            max-width: 400px;
            border-radius: 10px;
            text-align: center;
        }
        .confirm-modal-content p {
            margin-bottom: 20px;
            font-size: 16px;
        }
        .confirm-modal-buttons {
            display: flex;
            justify-content: center;
            gap: 15px;
        }
        .confirm-modal-buttons button {
            padding: 10px 20px;
            border-radius: 5px;
            font-weight: 600;
            cursor: pointer;
            border: none;
        }
        #confirmBtnYes {
            background-color: var(--danger-color);
            color: white;
        }
        #confirmBtnNo {
            background-color: #ccc;
        }

        /* Search Page Specific Styles */
        .search-page-container { /* General Search Page */
            padding: 20px;
            background-color: white;
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
            margin-bottom: 20px;
        }
        .search-input-wrapper {
            position: relative;
            margin-bottom: 20px;
        }
        .search-input-wrapper input {
            width: 100%;
            padding: 12px 15px 12px 45px;
            border: 1px solid #ddd;
            border-radius: 30px;
            font-size: 16px;
            outline: none;
            transition: all 0.3s;
        }
        .search-input-wrapper input:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(58, 134, 255, 0.2);
        }
        .search-input-wrapper i.fa-search { /* Specific to search icon in wrapper */
            position: absolute;
            left: 15px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--gray-color);
        }
        .search-filters {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-bottom: 20px;
        }
        .search-filter-btn {
            padding: 8px 15px;
            border: 1px solid var(--primary-color);
            border-radius: 20px;
            background-color: white;
            color: var(--primary-color);
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
        }
        .search-filter-btn.active, .search-filter-btn:hover {
            background-color: var(--primary-color);
            color: white;
        }
        .search-results-container {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }
        .search-result-user-card {
            display: flex;
            align-items: center;
            background-color: var(--light-color);
            padding: 10px 15px;
            border-radius: 8px;
            box-shadow: 0 1px 5px rgba(0,0,0,0.05);
            cursor: pointer;
            transition: background-color 0.2s;
        }
        .search-result-user-card:hover {
            background-color: #e9ecef;
        }
        .search-result-user-info h4 {
            font-size: 16px;
            margin-bottom: 5px;
            display: flex;
            align-items: center;
        }
        .search-result-user-info p {
            font-size: 13px;
            color: var(--gray-color);
        }
        /* Reels Search Page Specific Styles */
        #reelsSearchPage {
            background-color: white; /* Full page background */
            height: 100vh; /* Full viewport height */
            display: flex;
            flex-direction: column;
        }
        #reelsSearchPage .reels-search-header {
            display: flex;
            align-items: center;
            padding: 10px 15px;
            border-bottom: 1px solid #eee;
            background-color: var(--light-color);
        }
        #reelsSearchPage .reels-search-header .back-btn {
            background: none;
            border: none;
            font-size: 20px;
            color: var(--gray-color);
            cursor: pointer;
            margin-right: 15px;
        }
        #reelsSearchPage .reels-search-header h3 {
            flex-grow: 1;
            text-align: center;
            margin: 0;
            font-size: 18px;
        }
        #reelsSearchPage .search-input-wrapper { /* Reuse existing style */
            padding: 15px;
        }
        #reelsSearchResultsContainer.explore-reels-grid { /* Reuse grid style */
            flex-grow: 1;
            overflow-y: auto;
            padding: 15px;
        }


        /* Support Icon on Post */
        .support-icon {
            margin-left: 10px;
            color: var(--success-color);
            font-size: 16px;
            cursor: pointer;
            transition: transform 0.2s;
        }
        .support-icon:hover {
            transform: scale(1.1);
        }

        /* Support Creator Modal */
        #supportCreatorModal .modal-content,
        #paymentModal .modal-content {
            width: 90%;
            max-width: 400px;
            height: auto;
            border-radius: 10px;
            padding: 20px;
            text-align: center;
        }
        .support-price-options {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        .support-price-btn {
            width: 100%;
            padding: 12px;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
        }
        .support-price-btn:hover {
            opacity: 0.9;
            transform: translateY(-2px);
        }

        /* Comment Specific Styles */
        .comment-item {
            display: flex;
            align-items: flex-start;
            margin-bottom: 15px;
            position: relative;
            user-select: none;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
        }
        .comment-item img {
            width: 35px;
            height: 35px;
            border-radius: 50%;
            object-fit: cover;
            margin-right: 10px;
        }
        .comment-content-wrapper {
            flex-grow: 1;
            background-color: #f0f2f5;
            padding: 10px 12px;
            border-radius: 18px;
        }
        .comment-content-wrapper strong {
            font-size: 14px;
            margin-right: 5px;
            display: flex;
            align-items: center;
        }
        .comment-content-wrapper p {
            font-size: 14px;
            line-height: 1.4;
            margin-top: 2px;
        }
        .comment-actions {
            display: flex;
            gap: 15px;
            margin-top: 5px;
            margin-left: 55px;
            font-size: 12px;
            color: var(--gray-color);
        }
        .comment-action-btn {
            background: none;
            border: none;
            color: inherit;
            font-size: 12px;
            cursor: pointer;
            font-weight: 600;
            padding: 0;
            transition: color 0.2s;
        }
        .comment-action-btn:hover {
            color: var(--primary-color);
        }
        .comment-action-btn.liked {
            color: var(--primary-color);
        }
        .comment-time {
            font-size: 11px;
            color: var(--gray-color);
            margin-right: 15px;
        }

        /* Load More Button */
        .load-more-btn {
            display: block;
            width: fit-content;
            margin: 20px auto;
            padding: 10px 20px;
            background-color: var(--primary-color);
            color: white;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-weight: 600;
            transition: opacity 0.3s;
        }
        .load-more-btn:hover {
            opacity: 0.9;
        }
        .load-more-btn:disabled {
            background-color: var(--gray-color);
            cursor: not-allowed;
        }

        /* Mentions Dropdown Styles */
        .mentions-dropdown {
            position: absolute; /* Positioned by JS near the input */
            background-color: white;
            border: 1px solid #ddd;
            border-radius: 6px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
            max-height: 150px;
            overflow-y: auto;
            z-index: 1100; /* Above most elements, but below modals if active */
            width: auto; /* Adjust width based on content or set a fixed one */
            min-width: 150px;
        }
        .mentions-dropdown .mention-item {
            padding: 8px 12px;
            font-size: 14px;
            cursor: pointer;
            display: flex;
            align-items: center;
        }
        .mentions-dropdown .mention-item:hover {
            background-color: #f0f0f0;
        }
        .mentions-dropdown .mention-item img { /* Small avatar in dropdown */
            width: 24px;
            height: 24px;
            border-radius: 50%;
            margin-right: 8px;
            object-fit: cover;
        }
        .mentions-dropdown .mention-item .username {
            font-weight: 500;
        }
        .mentions-dropdown .mention-item .name {
            font-size: 12px;
            color: var(--gray-color);
            margin-left: 5px;
        }
        /* End Mentions Dropdown Styles */

        /* Suggested Users on Home Feed */
        .suggested-users-container {
            background-color: #f9f9f9; /* Slightly different background */
            padding: 15px;
            margin-bottom: 25px; /* Same as post-card margin */
            border-radius: 12px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        }
        .suggested-users-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
        }
        .suggested-users-header h4 {
            font-size: 16px;
            font-weight: 600;
            color: var(--dark-color);
        }
        .suggested-users-header .see-all-btn { /* Optional See All button */
            font-size: 13px;
            color: var(--primary-color);
            text-decoration: none;
            font-weight: 500;
        }
        .suggested-users-scroll {
            display: flex;
            overflow-x: auto;
            gap: 15px;
            padding-bottom: 10px; /* For scrollbar visibility if needed */
        }
        /* Hide scrollbar visually if desired, while keeping functionality */
        .suggested-users-scroll::-webkit-scrollbar {
            height: 6px;
        }
        .suggested-users-scroll::-webkit-scrollbar-thumb {
            background: #ccc;
            border-radius: 3px;
        }
        .suggested-users-scroll::-webkit-scrollbar-thumb:hover {
            background: #bbb;
        }

        .suggested-user-card {
            min-width: 150px; /* Ensure cards have a minimum width */
            max-width: 160px;
            background-color: white;
            border-radius: 10px;
            padding: 15px;
            text-align: center;
            box-shadow: 0 1px 4px rgba(0,0,0,0.08);
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
        }
        .suggested-user-card .avatar {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            object-fit: cover;
            margin-bottom: 5px;
        }
        .suggested-user-card .username {
            font-size: 14px;
            font-weight: 600;
            color: var(--dark-color);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            width: 100%;
        }
        .suggested-user-card .name {
            font-size: 12px;
            color: var(--gray-color);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            width: 100%;
        }
        .suggested-user-card .sugg-follow-btn {
            padding: 6px 12px;
            font-size: 13px;
            font-weight: 600;
            border-radius: 6px;
            margin-top: 8px;
            width: 100%;
        }
        .suggested-user-card .sugg-remove-btn {
            background: none;
            border: none;
            color: var(--gray-color);
            font-size: 11px;
            margin-top: 5px;
            cursor: pointer;
        }
        .suggested-user-card .sugg-remove-btn:hover {
            text-decoration: underline;
        }
        /* End Suggested Users */


        /* Responsive */
        @media (min-width: 992px) {
            .sidebar {
                display: block;
            }

            .main-content {
                margin-left: 250px;
            }

            .bottom-nav {
                display: none;
            }

            body {
                padding-bottom: 0; /* No bottom nav on desktop, so no body padding needed */
            }
        }

        @media (max-width: 991px) { /* Styles for tablet and mobile where bottom-nav is potentially visible */
            body {
                padding-bottom: 60px; /* Add padding to body for bottom nav */
            }
        }


        @media (max-width: 768px) {
            .search-bar {
                display: none;
            }
            .search-icon-mobile {
                display: block;
            }

            .content-area {
                flex-direction: column;
            }

            .sidebar-right {
                display: none;
            }

            #commentModal .modal-content {
                height: 70vh;
            }

            .profile-info {
                flex-direction: column;
                align-items: center;
                text-align: center;
            }
            .profile-avatar {
                margin-top: -60px;
                margin-bottom: 20px;
                margin-right: 0;
            }
            .profile-details {
                width: 100%;
            }
            .profile-stats, .profile-actions {
                justify-content: center;
            }
            .profile-tabs {
                justify-content: flex-start;
            }

            .main-content {
                padding-top: 70px; /* Header height (60px) + 10px breathing room */
                padding-left: 0; /* Edge-to-edge feed content on mobile */
                padding-right: 0;
                padding-bottom: 20px; /* Keep bottom padding */
            }
            .post-card, .skeleton-post-card {
                margin-left: 0;
                margin-right: 0;
                border-radius: 0; /* Edge-to-edge posts on mobile */
                border-left: none; /* No side borders for edge-to-edge */
                border-right: none;
                /* box-shadow: none; /* Optional: flatter look for mobile */
            }
            /* Keep top/bottom border for separation between posts */
            .post-card:first-child {
                border-top: 1px solid #f0f0f0; /* Add top border for first card if others have it from bottom */
            }
             .post-card:not(:first-child) {
                /* The margin-bottom handles separation, border-top on .post-stats/actions provides internal line */
            }

            .post-header, .post-content, .post-stats, .post-actions {
                padding-left: 15px; /* Keep internal horizontal padding */
                padding-right: 15px;
            }
             .skeleton-post-card { /* Ensure skeleton also respects edge-to-edge */
                padding: 15px;
                border-radius: 0;
                border-left: none;
                border-right: none;
            }
            .post-content {
                padding-bottom: 15px; /* Space below text if media follows */
                /* padding-left and padding-right are handled by the general rule for .post-content */
            }
            .post-card .post-image,
            .post-card .post-video-container,
            .post-card .post-gallery-container {
                margin-left: -15px; /* Counteract .post-content padding */
                margin-right: -15px; /* Counteract .post-content padding */
                width: calc(100% + 30px); /* Span full width */
                border-radius: 0; /* Edge-to-edge look */
            }
            .post-card .post-image {
                /* Specific if different from video/gallery, e.g. if it had its own margin-bottom */
                 margin-bottom: 15px; /* Keep its original margin-bottom if content follows it */
            }
             .post-card .post-video-container, .post-card .post-gallery-container {
                 margin-bottom: 15px; /* Keep original margin-bottom */
             }


            .post-card .tags-display {
                padding-left: 15px;
                padding-right: 15px;
            }
        }
    
