
        :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;
        }

        * {
            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);
            padding-bottom: 60px;
            display: flex; /* For loading spinner */
            justify-content: center; /* For loading spinner */
            align-items: center; /* For loading spinner */
            min-height: 100vh; /* For loading spinner */
        }

        /* Loading Spinner */
        #loadingSpinner {
            display: flex;
            justify-content: center;
            align-items: center;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(255, 255, 255, 0.8);
            z-index: 9999;
        }

        .spinner {
            border: 8px solid #f3f3f3;
            border-top: 8px solid var(--primary-color);
            border-radius: 50%;
            width: 60px;
            height: 60px;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* 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;
        }

        .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;
        }

        .create-post-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(58, 134, 255, 0.3);
        }

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

        /* Main Content */
        .main-content {
            flex: 1;
            padding: 20px;
        }

        .header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            background-color: white;
            padding: 15px 20px;
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
        }

        .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;
        }

        .notification-icon, .message-icon {
            position: relative;
            margin-right: 20px;
            cursor: pointer;
        }

        .notification-icon i, .message-icon 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: 2;
        }

        .sidebar-right {
            flex: 1;
        }

        /* Post Card */
        .post-card {
            background-color: white;
            border-radius: 10px;
            margin-bottom: 20px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
            overflow: hidden;
        }

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

        .post-user {
            display: flex;
            align-items: center;
            cursor: pointer; /* Make the whole user block clickable */
        }

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

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

        .post-user-info h4 {
            font-size: 15px;
            margin-bottom: 2px;
            display: flex; /* To align name and verified tick */
            align-items: center;
        }
        .post-user-info h4 .follow-button {
            margin-left: 10px;
            padding: 4px 8px;
            font-size: 12px;
            border-radius: 5px;
            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: white;
            color: var(--primary-color);
        }
        .post-user-info h4 .follow-button:hover {
            opacity: 0.8;
        }

        .post-user-info p {
            font-size: 12px;
            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; /* Hidden by default */
        }
        .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 15px 15px;
        }

        .post-text {
            margin-bottom: 15px;
            line-height: 1.5;
        }

        .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: #000;
        }

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

        .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;
            padding: 0 15px;
            border-top: 1px solid #eee;
            border-bottom: 1px solid #eee;
            padding: 10px 15px;
            color: var(--gray-color);
            font-size: 14px;
        }

        .post-actions {
            display: flex;
            justify-content: space-around;
            padding: 10px 15px;
        }

        .post-action {
            display: flex;
            align-items: center;
            color: var(--gray-color);
            cursor: pointer;
            padding: 5px 10px;
            border-radius: 5px;
            transition: all 0.3s;
        }

        .post-action:hover {
            background-color: rgba(58, 134, 255, 0.1);
            color: var(--primary-color);
        }

        .post-action i {
            margin-right: 5px;
        }

        /* Changed liked color to primary-color (blue) */
        .post-action.liked {
            color: var(--primary-color); /* Blue for liked state */
        }

        /* Reels */
        .reels-container {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100vh;
            background-color: black;
            overflow-y: scroll;
            scroll-snap-type: y mandatory;
            z-index: 1000;
            display: none;
        }

        .reel-item {
            width: 100%;
            height: 100vh;
            scroll-snap-align: start;
            position: relative;
        }

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

        .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;
        }

        /* Reels like icon color */
        .reel-action.liked i {
            color: var(--primary-color); /* Blue for liked state on reels */
        }

        .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; /* To align name and verified tick */
            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;
        }

        /* Chat Modal - Full Screen */
        .chat-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw; /* Full viewport width */
            height: 100vh; /* Full viewport height */
            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; /* Remove border-radius for full screen */
            width: 100%;
            max-width: 100%; /* Full width */
            height: 100%; /* Full height */
            max-height: 100%; /* Full height */
            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; /* To align name and verified tick */
            align-items: center;
        }

        .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.4;
        }

        .message-bubble.sent {
            background-color: var(--primary-color);
            color: white;
            align-self: flex-end;
            border-bottom-right-radius: 2px;
        }

        .message-bubble.received {
            background-color: #e2e2e2;
            color: var(--dark-color);
            align-self: flex-start;
            border-bottom-left-radius: 2px;
        }

        .message-bubble span {
            display: block;
            font-size: 12px;
            color: rgba(255, 255, 255, 0.7);
            margin-top: 5px;
        }
        .message-bubble.received span {
            color: var(--gray-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 button {
            background-color: var(--primary-color);
            color: white;
            border: none;
            border-radius: 20px;
            padding: 10px 15px;
            cursor: pointer;
            font-weight: 600;
        }

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

        .profile-banner {
            height: 200px;
            background-color: #ddd;
            border-radius: 10px;
            margin-bottom: 20px;
            position: relative;
            overflow: hidden;
        }

        .profile-banner img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .profile-info {
            display: flex;
            align-items: flex-start;
        }

        .profile-avatar {
            width: 120px;
            height: 120px;
            border-radius: 50%;
            object-fit: cover;
            border: 5px solid white;
            margin-top: -60px;
            margin-right: 30px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        }

        .profile-details {
            flex: 1;
        }

        .profile-name {
            font-size: 24px;
            font-weight: 600;
            margin-bottom: 5px;
            display: flex; /* To align name and verified tick */
            align-items: center;
        }

        .profile-title {
            color: var(--gray-color);
            margin-bottom: 15px;
        }

        .profile-bio {
            margin-bottom: 15px;
            line-height: 1.5;
        }

        .profile-stats {
            display: flex;
            gap: 20px;
            margin-bottom: 20px;
        }

        .profile-stat {
            display: flex;
            flex-direction: column;
        }

        .stat-number {
            font-weight: 600;
            font-size: 18px;
        }

        .stat-label {
            font-size: 12px;
            color: var(--gray-color);
        }

        .profile-actions {
            display: flex;
            gap: 10px;
        }

        .profile-btn {
            padding: 8px 15px;
            border-radius: 5px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
        }

        .primary-btn {
            background-color: var(--primary-color);
            color: white;
            border: none;
        }

        .secondary-btn {
            background-color: white;
            color: var(--primary-color);
            border: 1px solid var(--primary-color);
        }

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

        .profile-tabs {
            display: flex;
            border-bottom: 1px solid #eee;
            margin-bottom: 20px;
        }

        .profile-tab {
            padding: 10px 20px;
            cursor: pointer;
            font-weight: 600;
            color: var(--gray-color);
            border-bottom: 2px solid transparent;
            transition: all 0.3s;
        }

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

        .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%; /* 1:1 Aspect Ratio */
            background-color: #eee;
            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;
        }

        /* 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;
        }

        .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; /* Full viewport width */
            height: 100vh; /* Full viewport height */
            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; /* Remove border-radius for full screen */
            width: 100%;
            max-width: 100%; /* Full width */
            max-height: 100%; /* Full height */
            height: 100%; /* Full height */
            overflow-y: auto;
            display: flex;
            flex-direction: column;
        }
        
        /* Comments Modal Specific Styling */
        #commentModal .modal-content {
            width: 100%;
            max-width: 600px;
            height: 80vh; /* Full half page height */
            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 {
            width: 90%;
            max-width: 500px;
            height: auto;
            min-height: 200px;
            border-radius: 10px;
            padding: 20px;
            text-align: center;
        }
        #settingsModal .settings-option {
            padding: 12px 15px;
            margin-bottom: 10px;
            background-color: var(--light-color);
            border-radius: 8px;
            cursor: pointer;
            transition: background-color 0.3s;
            text-align: left;
            font-weight: 500;
        }
        #settingsModal .settings-option:hover {
            background-color: #e9ecef;
        }
        #settingsModal .settings-option.danger {
            color: var(--danger-color);
            font-weight: 600;
        }

        /* Account Settings Modal Specific Styling */
        #accountSettingsModal .modal-content {
            width: 90%;
            max-width: 500px;
            height: auto;
            min-height: 200px;
            border-radius: 10px;
            padding: 20px;
            text-align: center;
        }
        #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; /* Allow body to grow and take available space */
            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; /* Allow textarea to grow */
        }

        .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: #000;
        }

        .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;
        }

        .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;
        }

        .story-item {
            min-width: 100px;
            text-align: center;
            cursor: pointer;
        }
        .story-item.add-story {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            border: 2px dashed var(--gray-color);
            border-radius: 10px;
            padding: 10px;
            min-height: 120px; /* Adjust to match avatar height */
            color: var(--gray-color);
            font-weight: 600;
            font-size: 14px;
        }
        .story-item.add-story i {
            font-size: 30px;
            margin-bottom: 5px;
        }

        .story-avatar {
            width: 70px;
            height: 70px;
            border-radius: 50%;
            object-fit: cover;
            border: 2px solid var(--primary-color); /* Yellow border for unviewed */
            padding: 2px;
            margin-bottom: 5px;
        }
        .story-avatar.viewed {
            border-color: var(--gray-color); /* Gray border for viewed */
        }
        .story-avatar.my-story-avatar { /* New style for current user's active story */
            border-color: var(--success-color); /* Green for current user's active story */
            border-width: 3px;
        }


        .story-username {
            font-size: 12px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 100px;
        }
        
        /* 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; /* To align name and verified tick */
            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(--primary-color); /* Blue for verification tick */
            font-size: 14px;
            margin-left: 5px;
        }

        /* 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 Horizontal Scroll */
        .explore-reels-horizontal {
            display: flex;
            overflow-x: auto;
            gap: 15px;
            padding-bottom: 10px; /* For scrollbar */
            white-space: nowrap; /* Prevent wrapping */
        }

        .explore-reel-item {
            flex: 0 0 auto; /* Do not grow, do not shrink, base size auto */
            width: 150px; /* Fixed width for horizontal items */
            height: 250px; /* Fixed height */
            background-color: black;
            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;
        }

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

        #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;
        }

        /* Skeleton Loader Styles */
        .skeleton-card {
            background-color: #fff;
            border-radius: 10px;
            margin-bottom: 20px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
            padding: 15px;
        }
        .skeleton-header {
            display: flex;
            align-items: center;
            margin-bottom: 15px;
        }
        .skeleton-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background-color: #e0e0e0;
            margin-right: 10px;
        }
        .skeleton-user-info {
            flex: 1;
        }
        .skeleton-line {
            height: 12px;
            background-color: #e0e0e0;
            border-radius: 4px;
            margin-bottom: 8px;
        }
        .skeleton-line.short {
            width: 60%;
        }
        .skeleton-content {
            height: 200px;
            background-color: #e0e0e0;
            border-radius: 8px;
        }
        .shimmer {
            position: relative;
            overflow: hidden;
            background-color: #e0e0e0;
        }
        .shimmer::after {
            content: '';
            position: absolute;
            top: 0;
            left: -150%;
            width: 150%;
            height: 100%;
            background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
            animation: shimmer-animation 1.5s infinite;
        }
        @keyframes shimmer-animation {
            from {
                left: -150%;
            }
            to {
                left: 150%;
            }
        }
        
        /* 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); }

        /* 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;
        }

        /* Responsive */
        @media (min-width: 992px) {
            .sidebar {
                display: block;
            }
            
            .main-content {
                margin-left: 250px;
            }
            
            .bottom-nav {
                display: none;
            }
            
            body {
                padding-bottom: 0;
            }
        }

        @media (max-width: 768px) {
            .search-bar {
                display: none;
            }
            
            .content-area {
                flex-direction: column;
            }
            
            .sidebar-right {
                display: none;
            }
            
            #commentModal .modal-content {
                height: 70vh; /* Adjust for smaller screens */
            }
        }
    
