* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background: #000;
    color: white;
    max-width: 500px;
    margin: 0 auto;
    min-height: 100vh;
    padding-bottom: 70px;
}

/* Loading Screen */
#loadingScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-logo {
    font-family: 'Brush Script MT', cursive;
    font-size: 60px;
    background: linear-gradient(45deg, #405DE6, #5851DB, #833AB4, #C13584, #E1306C, #FD1D1D);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #333;
    border-top: 4px solid #E1306C;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Login Screen */
#loginScreen {
    padding: 20px;
    background: #000;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.login-container {
    width: 100%;
    max-width: 350px;
}

.app-logo {
    font-family: 'Brush Script MT', cursive;
    font-size: 52px;
    text-align: center;
    background: linear-gradient(45deg, #405DE6, #5851DB, #833AB4, #C13584, #E1306C, #FD1D1D);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 40px;
}

.login-card {
    background: #121212;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 30px 40px;
    margin-bottom: 10px;
}

.login-input {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid #333;
    border-radius: 5px;
    font-size: 14px;
    background: #000;
    color: white;
}

.login-btn {
    width: 100%;
    padding: 12px;
    margin-top: 12px;
    background: #0095f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

.login-btn:disabled {
    background: #00376b;
    cursor: not-allowed;
}

.signup-btn {
    background: #0095f6;
}

.error-msg {
    color: #ed4956;
    font-size: 14px;
    margin-top: 10px;
    text-align: center;
    min-height: 20px;
}

/* Home Screen */
#homeScreen {
    display: none;
}

/* Reels Screen */
#reelsScreen {
    display: none;
    background: #000;
    height: calc(100vh - 70px);
    overflow: hidden;
    position: relative;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #000;
    border-bottom: 1px solid #333;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-logo {
    font-family: 'Brush Script MT', cursive;
    font-size: 28px;
    background: linear-gradient(45deg, #405DE6, #C13584);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: bold;
}

.header-icons {
    display: flex;
    gap: 15px;
}

.header-icon {
    font-size: 20px;
    color: white;
    cursor: pointer;
    position: relative;
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ed4956;
    color: white;
    font-size: 10px;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    font-weight: bold;
    border: 1px solid #000;
}

/* Reels Container */
.reels-container {
    height: calc(100vh - 120px);
    position: relative;
    overflow: hidden;
}

.reel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

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

.reel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    z-index: 10;
}

.reel-user-info {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.reel-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(45deg, #405DE6, #C13584);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    margin-right: 10px;
    border: 2px solid #E1306C;
}

.reel-user-details {
    flex: 1;
}

.reel-username {
    font-weight: 600;
    font-size: 14px;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}

.online-badge {
    background: #25D366;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
}

.offline-badge {
    background: #666;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
}

.reel-caption {
    font-size: 14px;
    color: white;
    margin: 5px 0;
    max-width: 80%;
    line-height: 1.4;
}

.reel-music {
    font-size: 12px;
    color: white;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
}

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

.reel-action-btn {
    background: none;
    border: none;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.reel-action-icon {
    font-size: 24px;
    margin-bottom: 5px;
    background: rgba(0,0,0,0.3);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reel-action-count {
    font-size: 11px;
    font-weight: 600;
}

.reel-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
}

.reel-loader .spinner {
    border-top-color: '#E1306C';
}

/* Stories */
.stories-container {
    padding: 15px;
    background: #000;
    border-bottom: 1px solid #333;
    overflow-x: auto;
    display: flex;
    gap: 15px;
}

.story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
    cursor: pointer;
    position: relative;
}

.story-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    padding: 2px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.story-inner {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 2px solid #000;
    color: white;
    font-size: 24px;
}

.story-username {
    font-size: 11px;
    color: white;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Story Delete Button */
.story-delete-btn {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: #ed4956;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
    border: 2px solid #000;
    z-index: 10;
}

.story-item:hover .story-delete-btn {
    display: flex;
}

/* Posts */
.post {
    background: #000;
    margin-bottom: 15px;
    border-bottom: 1px solid #333;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
}

.post-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(45deg, #405DE6, #C13584);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

.post-username {
    font-weight: 600;
    font-size: 14px;
    color: white;
    cursor: pointer;
}

.post-more {
    font-size: 20px;
    color: white;
    cursor: pointer;
    position: relative;
}

.post-more-menu {
    position: absolute;
    top: 30px;
    right: 15px;
    background: #262626;
    border-radius: 8px;
    padding: 10px 0;
    min-width: 150px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    display: none;
    z-index: 100;
}

.post-more-item {
    padding: 12px 15px;
    font-size: 14px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.post-more-item:hover {
    background: #333;
}

.delete-item {
    color: #ed4956;
}

.post-image {
    width: 100%;
    height: 400px;
    background: #262626;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    position: relative;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-actions {
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.action-icons {
    display: flex;
    gap: 15px;
}

.action-icon {
    font-size: 24px;
    cursor: pointer;
    color: white;
}

.action-icon.liked {
    color: #ed4956;
}

.post-likes {
    padding: 0 15px;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 5px;
    color: white;
}

.post-caption {
    padding: 0 15px;
    font-size: 14px;
    margin-bottom: 8px;
    color: white;
    line-height: 1.4;
}

/* Comment Section */
.post-comments {
    padding: 0 15px;
    margin-bottom: 10px;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.comment-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
}

.comment-username {
    font-weight: 600;
    font-size: 13px;
    color: white;
    margin-right: 5px;
    cursor: pointer;
}

.comment-text {
    font-size: 13px;
    color: #ccc;
    flex: 1;
}

.comment-time {
    font-size: 10px;
    color: #8e8e8e;
    margin-top: 2px;
}

.comment-input-container {
    display: flex;
    padding: 0 15px 15px;
    gap: 10px;
}

.comment-input {
    flex: 1;
    padding: 10px 15px;
    background: #000;
    color: white;
    border: 1px solid #333;
    border-radius: 20px;
    font-size: 14px;
}

.comment-btn {
    background: #0095f6;
    color: white;
    border: none;
    padding: 0 15px;
    border-radius: 20px;
    cursor: pointer;
}

.post-time {
    padding: 0 15px 15px;
    color: #8e8e8e;
    font-size: 11px;
    text-transform: uppercase;
}

/* Online Status */
.online-status {
    position: fixed;
    top: 10px;
    right: 10px;
    background: #25D366;
    color: white;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 10px;
    z-index: 1000;
    display: none;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: 500px;
    background: #000;
    display: flex;
    justify-content: space-around;
    padding: 15px 0;
    border-top: 1px solid #333;
    z-index: 100;
}

.nav-icon {
    font-size: 22px;
    cursor: pointer;
    color: white;
}

.nav-icon.active {
    color: #0095f6;
}

/* Create Button */
.create-btn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #E1306C;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    border: none;
    z-index: 99;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #121212;
    border-radius: 12px;
    padding: 20px;
    width: 90%;
    max-width: 450px;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid #333;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    padding-bottom: 15px;
    margin-bottom: 20px;
    position: sticky;
    top: 0;
    background: #121212;
    z-index: 10;
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
    color: white;
}

.close-modal {
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

/* Create Modal */
textarea {
    width: 100%;
    padding: 12px;
    background: #111;
    color: white;
    border: 1px solid #444;
    border-radius: 5px;
    margin: 10px 0;
    min-height: 100px;
    resize: vertical;
    font-size: 14px;
}

.upload-btn {
    width: 100%;
    padding: 12px;
    background: #0095f6;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin: 10px 0;
    font-size: 14px;
}

.preview-image {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    margin: 10px 0;
    border-radius: 5px;
}

.remove-btn {
    background: #ed4956;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    margin-top: 5px;
    cursor: pointer;
    font-size: 12px;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(38, 38, 38, 0.9);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    z-index: 1000;
    font-size: 14px;
    border: 1px solid #333;
}

/* Progress Bar */
.progress-container {
    width: 100%;
    background: #333;
    border-radius: 10px;
    margin: 15px 0;
    overflow: hidden;
    display: none;
}

.progress-bar {
    height: 6px;
    background: linear-gradient(90deg, #E1306C, #405DE6);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    font-size: 12px;
    color: #8e8e8e;
    margin-top: 5px;
}

/* Messages Modal */
.messages-list {
    max-height: 400px;
    overflow-y: auto;
}

.message-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #333;
    cursor: pointer;
    transition: background 0.2s;
}

.message-item:hover {
    background: #1a1a1a;
}

.message-user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(45deg, #405DE6, #C13584);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 18px;
    margin-right: 15px;
}

.message-user-info {
    flex: 1;
}

.message-user-name {
    font-weight: 600;
    color: white;
    font-size: 15px;
    margin-bottom: 3px;
}

.message-preview {
    color: #8e8e8e;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

.message-time {
    color: #8e8e8e;
    font-size: 11px;
    margin-left: 10px;
}

.online-dot {
    width: 10px;
    height: 10px;
    background: #25D366;
    border-radius: 50%;
    margin-left: auto;
}

/* Chat Modal */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 400px;
}

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

.chat-message {
    max-width: 70%;
    padding: 8px 12px;
    border-radius: 18px;
    font-size: 14px;
    word-wrap: break-word;
}

.message-sent {
    background: #0095f6;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.message-received {
    background: #262626;
    color: white;
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

.message-time-small {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 2px;
    text-align: right;
}

.chat-input-container {
    display: flex;
    gap: 5px;
    padding: 10px;
    border-top: 1px solid #333;
    align-items: center;
}

.chat-input {
    flex: 1;
    padding: 10px 15px;
    background: #000;
    color: white;
    border: 1px solid #333;
    border-radius: 20px;
    font-size: 14px;
}

.send-btn {
    background: #0095f6;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Search Modal */
.search-input {
    width: 100%;
    padding: 12px;
    background: #000;
    color: white;
    border: 1px solid #333;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
}

.user-result {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #333;
    cursor: pointer;
}

.user-result:hover {
    background: #1a1a1a;
}

.user-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(45deg, #405DE6, #C13584);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    margin-right: 10px;
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 600;
    color: white;
    font-size: 14px;
}

.user-email {
    color: #8e8e8e;
    font-size: 12px;
}

/* Profile Modal */
.profile-header {
    text-align: center;
    padding: 20px 0;
}

.profile-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(45deg, #405DE6, #C13584);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    font-weight: 600;
    margin: 0 auto 15px;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    padding: 15px 0;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
}

.stat-item {
    text-align: center;
    cursor: pointer;
}

.stat-number {
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.stat-label {
    font-size: 12px;
    color: #8e8e8e;
    margin-top: 5px;
}

/* Follow Button */
.follow-btn {
    background: #0095f6;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    margin: 10px 5px;
}

.follow-btn.following {
    background: #333;
}

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

/* Story Modal */
.story-modal-content {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 0;
}

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

.story-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 10px;
}

/* Create Reel Modal */
#createReelModal .modal-content {
    max-width: 450px;
}

.video-preview-container {
    width: 100%;
    height: 300px;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    margin: 15px 0;
    position: relative;
}

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

.video-controls {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.control-btn {
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-icon {
    font-size: 50px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-text {
    font-size: 14px;
    margin-bottom: 5px;
    color: #8e8e8e;
}

/* Confirmation Modal */
.confirmation-modal .modal-content {
    max-width: 350px;
}

.confirmation-text {
    text-align: center;
    margin: 20px 0;
    font-size: 16px;
    color: white;
}

.confirmation-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.confirm-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.confirm-yes {
    background: #ed4956;
    color: white;
}

.confirm-no {
    background: #333;
    color: white;
}

/* User Profile Modal */
.user-profile-header {
    text-align: center;
    padding: 20px 0;
    position: relative;
}

.user-profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(45deg, #405DE6, #C13584);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 40px;
    font-weight: 600;
    margin: 0 auto 15px;
    border: 3px solid #E1306C;
}

/* Profile Tabs */
.profile-tabs {
    display: flex;
    border-top: 1px solid #333;
    margin: 20px -20px 0;
}

.profile-tab {
    flex: 1;
    text-align: center;
    padding: 15px 0;
    color: #8e8e8e;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border-top: 1px solid transparent;
}

.profile-tab.active {
    color: white;
    border-top: 1px solid white;
}

/* User Posts Grid */
.user-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    margin-top: 10px;
}

.user-post-item {
    aspect-ratio: 1;
    background: #262626;
    border-radius: 0;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.user-post-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    color: white;
    font-size: 16px;
}

.user-post-item:hover .post-overlay {
    opacity: 1;
}

/* Instagram Style Profile Header */
.profile-top {
    display: flex;
    align-items: center;
    padding: 20px;
    gap: 30px;
}

.profile-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

.profile-bio {
    padding: 0 20px;
    font-size: 14px;
    color: white;
    line-height: 1.4;
    margin-bottom: 15px;
}

/* Skeleton Loader */
.skeleton-loader {
    background: linear-gradient(90deg, #262626 25%, #333 50%, #262626 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Instagram Style Stories */
.story-seen {
    background: linear-gradient(45deg, #333, #555, #777) !important;
}

/* Reels Comments Modal */
.reels-comments-modal {
    max-height: 70vh;
}

.reels-comments-header {
    padding: 15px;
    border-bottom: 1px solid #333;
    position: sticky;
    top: 0;
    background: #121212;
    z-index: 10;
}

.reels-comments-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 15px;
}

.reels-comment-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #222;
}

.reels-comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(45deg, #405DE6, #C13584);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 12px;
    margin-right: 10px;
    flex-shrink: 0;
}

.reels-comment-content {
    flex: 1;
}

.reels-comment-username {
    font-weight: 600;
    font-size: 13px;
    color: white;
    margin-bottom: 5px;
    cursor: pointer;
}

.reels-comment-text {
    font-size: 13px;
    color: #ccc;
    line-height: 1.4;
}

.reels-comment-time {
    font-size: 10px;
    color: #8e8e8e;
    margin-top: 5px;
}

.reels-comment-input-container {
    padding: 15px;
    border-top: 1px solid #333;
    display: flex;
    gap: 10px;
    align-items: center;
}

.reels-comment-input {
    flex: 1;
    padding: 12px 15px;
    background: #000;
    color: white;
    border: 1px solid #333;
    border-radius: 20px;
    font-size: 14px;
}

.reels-comment-send-btn {
    background: #0095f6;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Double-tap Heart Animation */
.double-tap-heart {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 80px;
    color: white;
    opacity: 0;
    pointer-events: none;
    z-index: 50;
    animation: heartPop 0.8s ease-out;
}

@keyframes heartPop {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0);
    }
    15% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
    30% {
        transform: translate(-50%, -50%) scale(1);
    }
    45% {
        transform: translate(-50%, -50%) scale(1.1);
    }
    60% {
        transform: translate(-50%, -50%) scale(1);
    }
    75% {
        transform: translate(-50%, -50%) scale(1.05);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0);
    }
}

/* Reels Real-time Indicator */
.reel-real-time-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: #25D366;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 10px;
    z-index: 25;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ===== NOTIFICATIONS STYLES ===== */

/* Notifications Modal */
#notificationsModal .modal-content {
    max-width: 450px;
}

.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #333;
    position: sticky;
    top: 0;
    background: #121212;
    z-index: 10;
}

.notifications-title {
    font-size: 16px;
    font-weight: 600;
    color: white;
}

.mark-all-read-btn {
    background: #0095f6;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
}

.notifications-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 15px;
    border-bottom: 1px solid #333;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
}

.notification-item:hover {
    background: #1a1a1a;
}

.notification-item.unread {
    background: rgba(0, 149, 246, 0.05);
}

.notification-unread-dot {
    position: absolute;
    top: 12px;
    left: 5px;
    width: 8px;
    height: 8px;
    background: #0095f6;
    border-radius: 50%;
}

.notification-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(45deg, #405DE6, #C13584);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    margin-right: 12px;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-text {
    font-size: 13px;
    color: white;
    line-height: 1.4;
    margin-bottom: 3px;
}

.notification-username {
    font-weight: 600;
    color: white;
}

.notification-time {
    font-size: 11px;
    color: #8e8e8e;
    margin-top: 2px;
}

.notification-action-btn {
    margin-top: 8px;
    display: flex;
    gap: 8px;
}

.notification-follow-btn {
    background: #0095f6;
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 11px;
    cursor: pointer;
}

.notification-follow-btn.following {
    background: #333;
}

.notification-icon {
    font-size: 14px;
    margin-right: 5px;
}

.like-icon {
    color: #ed4956;
}

.comment-icon {
    color: #0095f6;
}

.follow-icon {
    color: #25D366;
}

.message-icon {
    color: #E1306C;
}

.notification-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.notification-empty-icon {
    font-size: 50px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.notification-empty-text {
    font-size: 14px;
    color: #8e8e8e;
}

/* Notification Types */
.notification-item.like {
    border-left: 3px solid #ed4956;
}

.notification-item.comment {
    border-left: 3px solid #0095f6;
}

.notification-item.follow {
    border-left: 3px solid #25D366;
}

.notification-item.message {
    border-left: 3px solid #E1306C;
}

/* Settings Modal */
.settings-section {
    margin-bottom: 20px;
}

.settings-section-title {
    font-size: 14px;
    font-weight: 600;
    color: white;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #333;
}

.settings-label {
    font-size: 14px;
    color: white;
}

.settings-description {
    font-size: 12px;
    color: #8e8e8e;
    margin-top: 3px;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #333;
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #0095f6;
}

input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* ===== NEW FEATURES ===== */

/* Edit Profile Modal */
#editProfileModal .modal-content {
    max-width: 400px;
}

.edit-profile-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-label {
    font-size: 14px;
    color: white;
    font-weight: 500;
}

/* Followers/Following Modals */
.follow-modal-content {
    max-height: 500px;
}

.follow-list {
    max-height: 400px;
    overflow-y: auto;
}

.follow-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #333;
    cursor: pointer;
    transition: background 0.2s;
}

.follow-item:hover {
    background: #1a1a1a;
}

.follow-item-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(45deg, #405DE6, #C13584);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
    margin-right: 12px;
}

.follow-item-info {
    flex: 1;
}

.follow-item-name {
    font-weight: 600;
    color: white;
    font-size: 14px;
    margin-bottom: 2px;
}

.follow-item-username {
    color: #8e8e8e;
    font-size: 12px;
}

.follow-item-action {
    margin-left: 10px;
}

/* Post Share Modal */
#shareModal .modal-content {
    max-width: 400px;
}

.share-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    min-width: 80px;
}

.share-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #262626;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 8px;
    transition: transform 0.2s;
}

.share-icon:hover {
    transform: scale(1.1);
}

.share-label {
    font-size: 12px;
    color: white;
}

.copy-link-container {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.copy-link-input {
    flex: 1;
    padding: 10px 15px;
    background: #000;
    color: white;
    border: 1px solid #333;
    border-radius: 8px;
    font-size: 14px;
}

/* Post View Modal */
#postViewModal .modal-content {
    padding: 0;
    background: #000;
    max-width: 800px;
    height: 80vh;
    display: flex;
    flex-direction: column;
}

.post-view-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.post-view-media {
    flex: 2;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.post-view-media img,
.post-view-media video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.post-view-sidebar {
    flex: 1;
    background: #000;
    border-left: 1px solid #333;
    display: flex;
    flex-direction: column;
    max-width: 350px;
}

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

.post-view-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.post-view-comments {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.post-view-actions {
    padding: 15px;
    border-top: 1px solid #333;
}

/* Tagged Posts Tab */
.tagged-empty-state {
    text-align: center;
    padding: 60px 20px;
}

/* Analytics Modal */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.analytics-card {
    background: #1a1a1a;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    border: 1px solid #333;
}

.analytics-value {
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin-bottom: 5px;
}

.analytics-label {
    font-size: 12px;
    color: #8e8e8e;
}

/* Dark Mode */
body.dark-mode {
    background: #0a0a0a;
}

.dark-mode .modal-content {
    background: #1a1a1a;
}

.dark-mode .post {
    background: #1a1a1a;
}

/* Loading Animation */
.pulse {
    animation: pulse 1.5s infinite;
}

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

/* Verified Badge */
.verified-badge {
    color: #0095f6;
    font-size: 12px;
    margin-left: 5px;
}

/* Hashtag Styling */
.hashtag {
    color: #0095f6;
    cursor: pointer;
}

/* Mention Styling */
.mention {
    color: #E1306C;
    font-weight: 600;
    cursor: pointer;
}

/* Gifts/Payments */
.gift-icon {
    color: #FFD700;
    font-size: 20px;
}

/* Live Streaming */
.live-badge {
    background: #FF0000;
    color: white;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: bold;
    animation: pulse 1.5s infinite;
}

/* Shopping/Products */
.product-tag {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
}

/* Polls */
.poll-container {
    background: #1a1a1a;
    border-radius: 10px;
    padding: 15px;
    margin: 10px 0;
}

.poll-question {
    font-weight: 600;
    margin-bottom: 10px;
}

.poll-option {
    background: #262626;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.poll-option:hover {
    background: #333;
}

/* High Contrast Mode */
.high-contrast {
    color: #000 !important;
    background: #fff !important;
}

.high-contrast .modal-content {
    background: #fff;
    color: #000;
}

/* ===== MUSIC SYSTEM STYLES ===== */

/* Music Modal */
#musicModal .modal-content {
    max-width: 450px;
}

.music-category-btn {
    background: #262626;
    color: white;
    border: 1px solid #444;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.music-category-btn:hover {
    background: #333;
    border-color: #E1306C;
}

.music-track-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #333;
    cursor: pointer;
    transition: background 0.2s;
}

.music-track-item:hover {
    background: #1a1a1a;
}

.music-track-item.selected {
    background: rgba(227, 48, 108, 0.1);
    border-left: 3px solid #E1306C;
}

.music-track-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, #405DE6, #C13584);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    color: white;
    font-size: 14px;
}

.music-track-info {
    flex: 1;
}

.music-track-title {
    font-weight: 600;
    font-size: 13px;
    color: white;
    margin-bottom: 3px;
}

.music-track-artist {
    font-size: 11px;
    color: #8e8e8e;
}

.music-track-duration {
    font-size: 11px;
    color: #8e8e8e;
}

.music-preview-btn {
    background: #0095f6;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 5px;
}

/* Post Music Badge */
.post-music-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: rgba(38, 38, 38, 0.8);
    border-radius: 20px;
    margin: 5px 15px 10px;
    cursor: pointer;
}

.post-music-icon {
    color: #E1306C;
    font-size: 14px;
}

.post-music-text {
    font-size: 12px;
    color: white;
    flex: 1;
}

.post-music-username {
    font-size: 10px;
    color: #8e8e8e;
}

/* Reels Music Styling */
.reels-music-badge {
    position: absolute;
    left: 15px;
    bottom: 120px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 20px;
    cursor: pointer;
    z-index: 25;
}

.reels-music-badge i {
    color: #E1306C;
    font-size: 14px;
}

.reels-music-text {
    font-size: 12px;
    color: white;
}

/* Story Music Badge */
.story-music-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    z-index: 100;
}

.story-music-overlay i {
    color: #E1306C;
    font-size: 12px;
}

.story-music-text {
    font-size: 11px;
    color: white;
}

/* Floating Music Player */
#floatingMusicPlayer {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 20px;
    padding: 10px;
    z-index: 1000;
}

/* Post Music Player */
.post-music-player {
    width: 100%;
    margin-top: 10px;
    height: 30px;
}

/* ===== VOICE MESSAGE STYLES ===== */
.chat-attach-btn {
    background: #333;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-right: 5px;
}

.chat-voice-btn {
    background: #E1306C;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-right: 10px;
}

.chat-voice-btn.recording {
    background: #FF0000;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.voice-recording-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #FF4444;
    font-weight: 600;
    font-size: 14px;
}

.voice-recording-dot {
    width: 12px;
    height: 12px;
    background: #FF4444;
    border-radius: 50%;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.voice-recording-text {
    flex: 1;
}

.voice-recording-timer {
    font-family: monospace;
    font-size: 14px;
}

.cancel-voice-btn {
    background: #333;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
}

.cancel-voice-btn:hover {
    background: #444;
}

/* Voice Message in Chat */
.voice-message-item {
    background: #262626;
    border-radius: 15px;
    padding: 10px 15px;
    margin: 5px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    border: 1px solid #333;
}

.voice-message-item:hover {
    background: #2d2d2d;
}

.voice-message-icon {
    color: #E1306C;
    font-size: 20px;
}

.voice-message-info {
    flex: 1;
}

.voice-message-duration {
    font-size: 12px;
    color: #8e8e8e;
}

/* Photo Message in Chat */
.photo-message-item {
    max-width: 250px;
    margin: 5px 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #333;
}

.photo-message-item img {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
}

.photo-message-caption {
    font-size: 11px;
    color: #8e8e8e;
    margin-top: 5px;
}

/* Chat Message Types */
.chat-message.voice-message {
    background: transparent;
    border: none;
    padding: 0;
}

.chat-message.photo-message {
    background: transparent;
    padding: 0;
    border: none;
    max-width: 250px;
}

/* Voice Message Play Animation */
.voice-message-playing .voice-message-icon {
    animation: soundWave 1s infinite;
}

@keyframes soundWave {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Voice Message Preview */
.voice-message-preview {
    margin: 10px;
    background: #1a1a1a;
    border-radius: 10px;
    padding: 15px;
}

/* View Count Styles */
.post-views {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #8e8e8e;
}

.post-stats {
    display: flex;
    gap: 15px;
    margin: 5px 15px;
    font-size: 14px;
}

.post-comments-count {
    cursor: pointer;
    color: #8e8e8e;
}

.post-comments-count:hover {
    color: #E1306C;
}

/* Reel View Count */
.reel-views {
    position: absolute;
    bottom: 80px;
    left: 15px;
    color: white;
    font-size: 12px;
    background: rgba(0,0,0,0.5);
    padding: 4px 10px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* User Profile Post Grid */
.user-post-item {
    position: relative;
    cursor: pointer;
    aspect-ratio: 1/1;
    overflow: hidden;
}

.user-post-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.user-post-item .post-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    color: white;
    opacity: 0;
    transition: opacity 0.3s;
}

.user-post-item:hover .post-overlay {
    opacity: 1;
}

/* Edit Profile Form */
.edit-profile-form {
    padding: 20px;
}

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

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

/* Double Tap Heart Animation */
.double-tap-heart {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 100px;
    color: white;
    opacity: 0;
    pointer-events: none;
    z-index: 100;
    animation: heartBeat 0.8s ease forwards;
}

@keyframes heartBeat {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* Story Music Overlay */
.story-music-overlay {
    position: absolute;
    bottom: 30px;
    left: 20px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 10px 15px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    z-index: 10;
    max-width: 200px;
}

.story-music-text {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Post View Modal */
.post-view-container {
    display: flex;
    height: 80vh;
    max-height: 800px;
    background: #000;
}

.post-view-media {
    flex: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.post-view-sidebar {
    flex: 2;
    max-width: 400px;
    background: #fff;
    display: flex;
    flex-direction: column;
    color: #000;
}

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

.post-view-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.post-view-comments {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.post-view-actions {
    padding: 15px;
    border-top: 1px solid #ddd;
}

.post-view-actions .action-icons {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.post-view-actions .action-icon {
    font-size: 24px;
    cursor: pointer;
}

.post-stats {
    display: flex;
    gap: 15px;
    margin: 10px 0;
    font-size: 14px;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .post-view-container {
        flex-direction: column;
        height: 90vh;
    }
    
    .post-view-media {
        flex: 2;
    }
    
    .post-view-sidebar {
        flex: 1;
        max-width: 100%;
    }
}

/* Share Message Styling */
.share-message-item {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: transform 0.2s;
    border: 1px solid #333;
    max-width: 280px;
}

.share-message-item:hover {
    transform: scale(1.02);
    background: #222;
}

.share-message-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.share-message-header i {
    font-size: 16px;
    color: #E1306C;
}

.share-message-content img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 8px;
}

.share-message-caption {
    font-size: 12px;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.share-message-footer {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #333;
    font-size: 10px;
    color: #8e8e8e;
}

/* Share Users List */
.share-users-list .user-result {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    border-bottom: 1px solid #333;
    cursor: pointer;
    transition: background 0.2s;
}

.share-users-list .user-result:hover {
    background: #1a1a1a;
}

.share-users-list .user-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(45deg, #405DE6, #C13584);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.share-users-list .user-info {
    flex: 1;
}

.share-users-list .user-name {
    font-weight: 600;
    color: white;
    font-size: 14px;
}

.share-users-list .user-email {
    font-size: 12px;
    color: #8e8e8e;
}

/* Post Share Button */
.post-actions .fa-paper-plane {
    cursor: pointer;
    transition: transform 0.2s;
}

.post-actions .fa-paper-plane:hover {
    transform: scale(1.2);
    color: #E1306C;
}

/* Reel Share Button */
.reel-action-btn .fa-paper-plane {
    cursor: pointer;
}

/* Post View Modal Full Screen */
#postViewModal .modal-content {
    max-width: 100%;
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
    padding: 0;
    background: #000;
}

.post-view-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: #000;
}

.post-view-media {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
    position: relative;
}

.post-view-media img,
.post-view-media video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.post-view-sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #000;
    border-top: 1px solid #333;
    padding: 15px;
    max-height: 50vh;
    overflow-y: auto;
}

.post-view-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
}

/* Post View Full Screen Toggle */
.fullscreen-toggle {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ================= COMPLETE COMMENTS UI REDESIGN ================= */

/* Post Comments Section */
.post-comments {
    margin-top: 10px;
    padding: 0 15px 10px;
    border-top: 1px solid #333;
}

.comments-list-container {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 10px;
    border-radius: 8px;
    background: #1a1a1a;
    padding: 10px;
}

/* Comment Item Redesign */
.comment-item-redesign {
    display: flex;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid #2a2a2a;
    transition: background 0.2s;
}

.comment-item-redesign:hover {
    background: #222;
}

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

.comment-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(45deg, #405DE6, #C13584);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.comment-username-redesign {
    font-weight: 600;
    font-size: 13px;
    color: white;
    cursor: pointer;
}

.comment-username-redesign:hover {
    color: #E1306C;
}

.comment-time-redesign {
    font-size: 10px;
    color: #8e8e8e;
}

.comment-text-redesign {
    font-size: 13px;
    color: #f0f0f0;
    line-height: 1.4;
    word-break: break-word;
}

.comment-actions {
    display: flex;
    gap: 15px;
    margin-top: 8px;
    font-size: 11px;
}

.comment-action {
    color: #8e8e8e;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}

.comment-action:hover {
    color: #E1306C;
}

.comment-action.like:hover {
    color: #ed4956;
}

.comment-action.reply:hover {
    color: #0095f6;
}

/* Comment Input Redesign */
.comment-input-container-redesign {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px;
    background: #1a1a1a;
    border-radius: 25px;
    border: 1px solid #333;
}

.comment-input-redesign {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-size: 13px;
    padding: 8px 12px;
    outline: none;
}

.comment-input-redesign::placeholder {
    color: #666;
}

.comment-send-btn {
    background: #0095f6;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.comment-send-btn:hover {
    background: #0077cc;
}

.comment-send-btn:disabled {
    background: #333;
    cursor: not-allowed;
}

/* View All Comments Button */
.view-comments-btn {
    color: #8e8e8e;
    font-size: 12px;
    cursor: pointer;
    padding: 5px 0;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}

.view-comments-btn:hover {
    color: #0095f6;
}

/* Comments Count Badge */
.comments-count-badge {
    background: rgba(0, 149, 246, 0.2);
    color: #0095f6;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    cursor: pointer;
}

/* Post View Modal Comments Section */
#postViewComments {
    max-height: 300px;
    overflow-y: auto;
    padding: 15px;
    background: #1a1a1a;
    border-radius: 10px;
    margin: 15px 0;
}

#postViewComments .comment-item-redesign {
    background: #222;
    border-radius: 8px;
    margin-bottom: 8px;
    padding: 12px;
}

/* Reels Comments Modal Redesign */
.reels-comments-modal .modal-content {
    max-width: 400px;
    height: 80vh;
    display: flex;
    flex-direction: column;
}

.reels-comments-header {
    padding: 20px;
    border-bottom: 1px solid #333;
    background: #000;
}

.reels-comments-list-redesign {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #1a1a1a;
}

.reels-comment-item-redesign {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #222;
    border-radius: 10px;
    margin-bottom: 10px;
    transition: transform 0.2s;
}

.reels-comment-item-redesign:hover {
    transform: translateY(-2px);
    background: #2a2a2a;
}

.reels-comment-avatar-redesign {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(45deg, #405DE6, #C13584);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 15px;
    flex-shrink: 0;
}

.reels-comment-content-redesign {
    flex: 1;
}

.reels-comment-username-redesign {
    font-weight: 600;
    font-size: 14px;
    color: white;
    margin-bottom: 5px;
    cursor: pointer;
}

.reels-comment-username-redesign:hover {
    color: #E1306C;
}

.reels-comment-text-redesign {
    font-size: 13px;
    color: #f0f0f0;
    line-height: 1.4;
    margin-bottom: 5px;
}

.reels-comment-time-redesign {
    font-size: 10px;
    color: #8e8e8e;
}

.reels-comment-input-container-redesign {
    padding: 15px;
    border-top: 1px solid #333;
    background: #000;
    display: flex;
    gap: 10px;
    align-items: center;
}

.reels-comment-input-redesign {
    flex: 1;
    background: #1a1a1a;
    border: 1px solid #333;
    color: white;
    padding: 10px 15px;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
}

.reels-comment-input-redesign::placeholder {
    color: #666;
}

.reels-comment-send-btn-redesign {
    background: #E1306C;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s;
}

.reels-comment-send-btn-redesign:hover {
    background: #c21752;
}

/* Scrollbar Styling */
.comments-list-container::-webkit-scrollbar,
#postViewComments::-webkit-scrollbar,
.reels-comments-list-redesign::-webkit-scrollbar {
    width: 6px;
}

.comments-list-container::-webkit-scrollbar-track,
#postViewComments::-webkit-scrollbar-track,
.reels-comments-list-redesign::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 10px;
}

.comments-list-container::-webkit-scrollbar-thumb,
#postViewComments::-webkit-scrollbar-thumb,
.reels-comments-list-redesign::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 10px;
}

.comments-list-container::-webkit-scrollbar-thumb:hover,
#postViewComments::-webkit-scrollbar-thumb:hover,
.reels-comments-list-redesign::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .comments-list-container {
        max-height: 150px;
    }
    
    #postViewComments {
        max-height: 250px;
    }
    
    .reels-comments-modal .modal-content {
        height: 70vh;
        width: 90%;
    }
}

/* Empty Comments State */
.empty-comments-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-comments-icon {
    font-size: 40px;
    margin-bottom: 10px;
    color: #444;
}

.empty-comments-text {
    font-size: 14px;
    color: #8e8e8e;
    margin-bottom: 5px;
}

.empty-comments-subtext {
    font-size: 12px;
    color: #666;
}

/* Enhanced Loading Screen */
#loadingScreen {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.loading-logo {
    font-size: 48px;
    font-weight: 800;
    color: white;
    margin-bottom: 30px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Groups System Styles */
.group-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid #333;
    cursor: pointer;
    transition: background 0.2s;
}

.group-item:hover {
    background: #1a1a1a;
}

.group-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(45deg, #405DE6, #C13584);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 20px;
}

.group-info {
    flex: 1;
}

.group-name {
    font-weight: 600;
    color: white;
    font-size: 16px;
    margin-bottom: 5px;
}

.group-last-message {
    font-size: 14px;
    color: #8e8e8e;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.group-details {
    text-align: right;
}

.group-members {
    font-size: 12px;
    color: #8e8e8e;
    margin-bottom: 5px;
}

.group-time {
    font-size: 11px;
    color: #666;
}

.group-admin-badge {
    color: #FFD700;
    font-size: 12px;
    margin-top: 5px;
}

.group-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(45deg, #405DE6, #C13584);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.group-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(45deg, #405DE6, #C13584);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 30px;
    margin: 0 auto 15px;
}

.selected-member {
    display: inline-block;
    margin: 3px;
}

.system-message {
    background: rgba(255, 255, 255, 0.1);
    color: #8e8e8e;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    text-align: center;
    max-width: 80%;
    margin: 5px auto;
}

.group-member-item {
    cursor: pointer;
    transition: background 0.2s;
}

.group-member-item:hover {
    background: #1a1a1a;
}

/* Bottom nav update */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #000;
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    border-top: 1px solid #333;
    z-index: 1000;
}

/* Minimal Dark Theme */
.login-container {
    min-height: 100vh;
    background: #121212;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.app-logo-container {
    text-align: center;
    margin-bottom: 50px;
}

.logo-text {
    font-size: 44px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.logo-subtitle {
    color: #888;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 1px;
}

.login-card {
    background: #1e1e1e;
    border-radius: 12px;
    padding: 40px 30px;
    width: 100%;
    max-width: 380px;
    border: 1px solid #333;
    position: relative; /* इसको add करो */
    min-height: 450px; /* Fixed height */
}

/* ============= ये नया CSS add करो ============= */
.auth-form {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    position: absolute;
    width: calc(100% - 60px); /* Padding adjust */
}

.auth-form.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    position: relative;
}

/* Form transition fix */
#loginForm.active,
#signupForm.active {
    position: relative;
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form container fix */
.login-card > div {
    position: relative;
}
/* ============= End of new CSS ============= */

.input-group {
    position: relative;
    margin-bottom: 25px;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 16px;
}

.login-input {
    width: 100%;
    padding: 16px 16px 16px 45px;
    background: #2a2a2a;
    border: 1px solid #333;
    border-radius: 8px;
    font-size: 14px;
    color: #fff;
    transition: all 0.3s;
}

.login-input:focus {
    border-color: #666;
    outline: none;
    background: #333;
}

.login-btn-primary {
    width: 100%;
    padding: 16px;
    background: #fff;
    color: #000;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.login-btn-primary:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.auth-tabs {
    display: flex;
    background: #2a2a2a;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 30px;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    color: #888;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s;
}

.auth-tab.active {
    background: #fff;
    color: #000;
}

.terms {
    text-align: center;
    font-size: 11px;
    color: #666;
    margin-top: 30px;
    line-height: 1.6;
}

.terms a {
    color: #888;
    text-decoration: none;
    border-bottom: 1px solid #444;
    padding-bottom: 1px;
}

.features {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 50px 0;
    color: #666;
    font-size: 12px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* नया CSS और elements के लिए */
.remember-me {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 13px;
    color: #888;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-label input {
    margin-right: 8px;
}

.forgot-password {
    color: #888;
    text-decoration: none;
    font-size: 13px;
}

.forgot-password:hover {
    color: #fff;
}

.social-login {
    margin-top: 25px;
}

.divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: #666;
    font-size: 12px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #333;
}

.divider span {
    padding: 0 15px;
}

.social-buttons {
    display: flex;
    gap: 10px;
}

.social-btn {
    flex: 1;
    padding: 12px;
    border: 1px solid #333;
    background: #2a2a2a;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
}

.social-btn:hover {
    background: #333;
    transform: translateY(-2px);
}

.google { color: #fff; }
.github { color: #fff; }

.error-msg {
    color: #ff6b6b;
    font-size: 13px;
    margin-bottom: 15px;
    min-height: 20px;
}

.login-footer {
    text-align: center;
    margin-top: 40px;
    color: #666;
    font-size: 12px;
}

.footer-text {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.footer-links {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.footer-links a {
    color: #666;
    text-decoration: none;
}

.footer-links a:hover {
    color: #fff;
}

/* Forgot Password Modal Styling */
#forgotPasswordModal .modal-content {
    background: #1e1e1e;
    border: 1px solid #333;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Social Buttons */
.social-btn.facebook {
    background: #1877F2;
    color: white;
}

.social-btn.facebook:hover {
    background: #166FE5;
    transform: translateY(-2px);
}

/* Phone Authentication Styles */
.country-code-select {
    background: #262626;
    border: 1px solid #333;
    border-right: none;
    color: white;
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
    border-radius: 8px 0 0 8px;
    width: 120px;
}

.country-code-select option {
    background: #262626;
    color: white;
}

.phone-input-container {
    display: flex;
    width: 100%;
}

.phone-number-input {
    flex: 1;
    background: #262626;
    border: 1px solid #333;
    border-left: none;
    color: white;
    padding: 10px 15px;
    font-size: 14px;
    outline: none;
    border-radius: 0 8px 8px 0;
}

/* OTP Timer */
.otp-timer {
    text-align: center;
    margin: 10px 0;
    font-size: 12px;
    color: #8e8e8e;
}

.resend-otp-btn {
    background: none;
    border: none;
    color: #0095f6;
    cursor: pointer;
    font-size: 12px;
    margin-top: 5px;
}

.resend-otp-btn:hover {
    text-decoration: underline;
}

/* OTP Input Boxes */
.otp-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 15px 0;
}

.otp-box {
    width: 40px;
    height: 40px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    background: #262626;
    border: 2px solid #333;
    border-radius: 8px;
    color: white;
    outline: none;
}

.otp-box:focus {
    border-color: #E1306C;
}

/* Share Button Styling */
.share-profile-btn {
    background: linear-gradient(45deg, #25D366, #128C7E) !important;
    color: white !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    transition: all 0.3s ease !important;
}

.share-profile-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3) !important;
}

/* Profile Share Icon */
.profile-share-icon {
    color: #25D366 !important;
    font-size: 18px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.profile-share-icon:hover {
    transform: scale(1.2) !important;
    color: #128C7E !important;
}

/* Share User Item in List */
.share-user-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #333;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #000;
}

.share-user-item:hover {
    background: #1a1a1a;
}

.share-user-item .user-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #E1306C;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.share-user-item .user-info {
    flex: 1;
    margin-left: 12px;
}

.share-user-item .user-name {
    font-weight: 600;
    font-size: 14px;
    color: white;
}

.share-user-item .user-email {
    font-size: 12px;
    color: #8e8e8e;
    margin-top: 2px;
}

.share-user-item .user-status {
    font-size: 11px;
    color: #25D366;
    margin-top: 2px;
}

.share-user-item .fa-paper-plane {
    color: #0095f6;
    font-size: 18px;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.share-user-item:hover .fa-paper-plane {
    opacity: 1;
    transform: translateX(3px);
}

/* Instagram Style Upload Screen */
#uploadScreen {
    background: #000;
}

.upload-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: #000;
    border-bottom: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    z-index: 1000;
}

.upload-title {
    font-size: 16px;
    font-weight: 600;
    color: white;
}

.upload-next-btn {
    background: #0095f6;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.upload-next-btn:disabled {
    background: #333;
    color: #666;
    cursor: not-allowed;
}

.upload-steps {
    position: fixed;
    top: 50px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: #000;
    z-index: 999;
}

.step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #333;
    transition: all 0.3s ease;
}

.step-dot.active {
    background: #0095f6;
    transform: scale(1.2);
}

.upload-step {
    padding: 120px 20px 80px;
    display: none;
    overflow-y: auto;
    height: calc(100vh - 200px);
}

.upload-step.active {
    display: block;
}

/* Step 1: Media Selection */
.media-selection {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.media-option {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.media-option:hover {
    background: #222;
    border-color: #666;
}

.media-icon {
    font-size: 40px;
    margin-bottom: 10px;
    color: #E1306C;
}

.media-label {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
    color: white;
}

.media-subtext {
    font-size: 12px;
    color: #8e8e8e;
}

.media-preview-container {
    margin: 20px 0;
    text-align: center;
}

.media-preview {
    background: #1a1a1a;
    border-radius: 10px;
    padding: 20px;
    border: 2px dashed #333;
}

.change-media-btn {
    background: #333;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    margin-top: 10px;
    cursor: pointer;
    font-size: 14px;
}

.media-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.media-btn {
    flex: 1;
    background: #262626;
    color: white;
    border: 1px solid #333;
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Step 2: Edit & Filters */
.edit-container {
    text-align: center;
}

.edit-preview {
    background: #1a1a1a;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-tools {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
    margin-bottom: 20px;
}

.edit-tool {
    flex-shrink: 0;
    text-align: center;
    cursor: pointer;
}

.filter-preview {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    margin-bottom: 5px;
    border: 2px solid transparent;
}

.filter-preview.normal {
    background: linear-gradient(45deg, #666, #888);
}

.filter-preview.clarendon {
    background: linear-gradient(45deg, #ff9966, #ff5e62);
}

.filter-preview.gingham {
    background: linear-gradient(45deg, #7b4397, #dc2430);
}

.filter-preview.lark {
    background: linear-gradient(45deg, #00c9ff, #92fe9d);
}

.filter-preview.moon {
    background: linear-gradient(45deg, #0f2027, #203a43, #2c5364);
}

.filter-name {
    font-size: 12px;
    color: #8e8e8e;
}

.edit-buttons {
    display: flex;
    gap: 10px;
}

.edit-btn {
    flex: 1;
    background: #262626;
    color: white;
    border: 1px solid #333;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Step 3: Music & Details */
.music-details-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.music-section, .caption-section, .extra-section {
    background: #1a1a1a;
    border-radius: 10px;
    padding: 15px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
    color: white;
}

.add-music-btn {
    margin-left: auto;
    background: #E1306C;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
}

.selected-music-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #262626;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.music-info {
    flex: 1;
}

.music-title {
    font-weight: 600;
    color: white;
    font-size: 14px;
}

.music-artist {
    font-size: 12px;
    color: #8e8e8e;
}

.remove-music-btn {
    background: none;
    border: none;
    color: #ed4956;
    cursor: pointer;
    font-size: 16px;
}

.no-music {
    text-align: center;
    padding: 20px;
    color: #8e8e8e;
    font-size: 14px;
}

.upload-textarea {
    width: 100%;
    height: 100px;
    background: #262626;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 10px;
    color: white;
    font-family: inherit;
    resize: none;
}

.caption-counter {
    text-align: right;
    font-size: 12px;
    color: #8e8e8e;
    margin-top: 5px;
}

.extra-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #333;
    cursor: pointer;
}

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

.extra-item i:first-child {
    margin-right: 10px;
    color: #8e8e8e;
}

.extra-item i:last-child {
    margin-left: auto;
    color: #666;
}

.extra-item span {
    flex: 1;
    color: white;
}

/* Step 4: Final Share */
.share-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.share-preview {
    background: #1a1a1a;
    border-radius: 10px;
    padding: 15px;
}

.share-details {
    margin-top: 15px;
}

.share-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.share-username {
    font-weight: 600;
    color: white;
}

.share-caption {
    color: white;
    font-size: 14px;
    margin-bottom: 10px;
}

.share-music {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #E1306C;
    font-size: 12px;
}

.share-options {
    background: #1a1a1a;
    border-radius: 10px;
    padding: 15px;
}

.share-option {
    padding: 12px 0;
    border-bottom: 1px solid #333;
}

.share-option:last-child {
    border-bottom: none;
}

.toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.toggle-text {
    color: white;
    font-size: 14px;
}

.share-now-btn {
    background: #0095f6;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.share-now-btn:disabled {
    background: #333;
    cursor: not-allowed;
}

/* Share Modal Styles */
.share-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.share-option {
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.share-option:hover {
    transform: scale(1.05);
}

.share-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    color: white;
    font-size: 24px;
}

.share-label {
    font-size: 12px;
    color: #8e8e8e;
}

.share-friends-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 10px;
}

.share-friend-item:hover {
    background: #1a1a1a;
}

.copy-link-container {
    padding-top: 15px;
    border-top: 1px solid #333;
}

.copy-link-input {
    flex: 1;
    padding: 10px;
    background: #262626;
    border: 1px solid #333;
    border-radius: 8px;
    color: white;
    font-size: 14px;
}

/* Post View Modal Styles */
.post-view-media img,
.post-view-media video {
    max-width: 100%;
    max-height: calc(100vh - 100px);
    object-fit: contain;
}

.post-view-comment-item {
    transition: background 0.3s;
}

.post-view-comment-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.comment-avatar {
    cursor: pointer;
    transition: transform 0.3s;
}

.comment-avatar:hover {
    transform: scale(1.1);
}

.comment-username {
    cursor: pointer;
    transition: color 0.3s;
}

.comment-username:hover {
    color: #0095f6 !important;
}

/* Share Preview Styles */
.share-preview {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 300px;
}

.share-preview:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.share-preview-header {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: #262626;
    border-bottom: 1px solid #333;
}

.share-preview-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #E1306C;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    color: white;
}

.share-preview-text {
    flex: 1;
}

.share-preview-title {
    font-weight: 600;
    color: white;
    font-size: 14px;
}

.share-preview-subtitle {
    font-size: 12px;
    color: #8e8e8e;
}

.share-preview-content {
    padding: 15px;
}

.share-preview-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.share-preview-video {
    position: relative;
    width: 100%;
    height: 150px;
    margin-bottom: 10px;
}

.share-preview-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.share-preview-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.share-preview-info {
    margin-top: 10px;
}

.share-preview-caption {
    color: white;
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.share-preview-stats {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #8e8e8e;
}

.share-preview-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.share-preview-action {
    padding: 10px 15px;
    background: #262626;
    border-top: 1px solid #333;
}

.share-preview-btn {
    width: 100%;
    padding: 8px 15px;
    background: #0095f6;
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    transition: background 0.3s ease;
}

.share-preview-btn:hover {
    background: #0081d6;
}

/* Adjust chat message for shares */
.share-message .message-time-small {
    margin-top: 5px;
    text-align: right;
}

/* For sent shares */
.message-sent .share-preview {
    background: #1a3a5f;
    border-color: #2a4a7f;
}

.message-sent .share-preview-header {
    background: #2a4a7f;
}

.message-sent .share-preview-action {
    background: #2a4a7f;
}

.message-sent .share-preview-btn {
    background: #0081d6;
}

/* ===== PROFILE PAGE FULL SCREEN FIX ===== */
#userProfileModal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 1000 !important;
    background: #000 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

#userProfileModal .modal-content {
    max-width: 100% !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    background: #000 !important;
    border: none !important;
    box-shadow: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

#userProfileModal .modal-content::-webkit-scrollbar {
    display: none;
}

.profile-avatar-ring {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, #FF6B35, #E1306C, #833AB4, #405DE6, #00F5FF);
    background-size: 300% 300%;
    animation: profileRingGlow 4s ease infinite;
}

@keyframes profileRingGlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.profile-avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #000;
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.profile-avatar-inner img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.profile-avatar-letter {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #405DE6, #C13584);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 36px;
    font-weight: 700;
}

.profile-btn-primary {
    flex: 1;
    padding: 10px 0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.profile-btn-follow {
    background: #0095f6;
    color: white;
}

.profile-btn-following {
    background: #262626;
    color: white;
    border: 1px solid #363636;
}

.profile-btn-edit {
    background: #262626;
    color: white;
    border: 1px solid #363636;
    width: 100%;
}

.profile-grid-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    cursor: pointer;
    background: #111;
}

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

.profile-grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    color: white;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.2s;
}

.profile-grid-item:hover .profile-grid-overlay,
.profile-grid-item:active .profile-grid-overlay {
    opacity: 1;
}

.profile-empty-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 30px;
    color: #666;
}

.profile-empty-posts i {
    font-size: 50px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.profile-empty-posts .empty-title {
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

.profile-empty-posts .empty-subtitle {
    font-size: 14px;
    color: #8e8e8e;
}

/* Messages Tabs - given by you */
.messages-tabs {
    display: flex;
    background: #1a1a1a;
    border-radius: 8px;
    margin: 10px 15px;
    padding: 4px;
}

.messages-tab {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    color: #888;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s;
}

.messages-tab.active {
    background: #fff;
    color: #000;
}

.messages-tab i {
    margin-right: 5px;
}

/* Groups inside messages */
.groups-container {
    padding: 10px;
    overflow-y: auto;
    height: calc(100vh - 180px);
}

/* Group item */
.group-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid #333;
    cursor: pointer;
    transition: background 0.2s;
}

.group-item:hover {
    background: #1a1a1a;
}

.group-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(45deg, #405DE6, #C13584);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 20px;
}

.group-info {
    flex: 1;
}

.group-name {
    font-weight: 600;
    color: white;
    font-size: 16px;
    margin-bottom: 5px;
}

.group-last-message {
    font-size: 14px;
    color: #8e8e8e;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.group-details {
    text-align: right;
}

.group-members {
    font-size: 12px;
    color: #8e8e8e;
    margin-bottom: 5px;
}

.group-time {
    font-size: 11px;
    color: #666;
}

.group-admin-badge {
    color: #FFD700;
    font-size: 12px;
    margin-top: 5px;
}

/* Group avatar large */
.group-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(45deg, #405DE6, #C13584);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 30px;
    margin: 0 auto 15px;
}

/* Create group modal */
.create-group-form {
    padding: 15px;
}

.selected-member {
    display: inline-block;
    margin: 3px;
}

/* Group member item */
.group-member-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #333;
    cursor: pointer;
}

.group-member-item:hover {
    background: #1a1a1a;
}

/* System message in group chat */
.system-message {
    background: rgba(255, 255, 255, 0.1);
    color: #8e8e8e;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    text-align: center;
    max-width: 80%;
    margin: 5px auto;
}

/* Group call videos grid */
#groupCallVideos video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    background: #111;
}

.participant-video {
    position: relative;
    background: #111;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 1/1;
}

.participant-name {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background: rgba(0,0,0,0.5);
    color: white;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 11px;
}

/* Messages Tabs - Updated */
.messages-tabs {
    display: flex;
    background: #1a1a1a;
    border-radius: 8px;
    margin: 10px 15px;
    padding: 4px;
}

.messages-tab {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    color: #888;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s;
}

.messages-tab.active {
    background: #fff;
    color: #000;
}

.messages-tab i {
    margin-right: 5px;
}

/* Create Group Floating Button */
.create-group-btn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: #E1306C;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(225, 48, 108, 0.3);
    z-index: 99;
    transition: transform 0.2s;
}

.create-group-btn:hover {
    transform: scale(1.05);
}

.create-group-btn i {
    font-size: 20px;
}

/* Groups Container */
.groups-container {
    padding: 10px;
    overflow-y: auto;
    height: calc(100vh - 180px);
}

/* Group Item */
.group-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid #333;
    cursor: pointer;
    transition: background 0.2s;
}

.group-item:hover {
    background: #1a1a1a;
}

.group-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(45deg, #405DE6, #C13584);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 20px;
    flex-shrink: 0;
}

.group-info {
    flex: 1;
}

.group-name {
    font-weight: 600;
    color: white;
    font-size: 16px;
    margin-bottom: 5px;
}

.group-last-message {
    font-size: 14px;
    color: #8e8e8e;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.group-details {
    text-align: right;
}

.group-members {
    font-size: 12px;
    color: #8e8e8e;
    margin-bottom: 5px;
}

.group-time {
    font-size: 11px;
    color: #666;
}

.group-admin-badge {
    color: #FFD700;
    font-size: 12px;
    margin-top: 5px;
}

/* Create Group Modal */
.create-group-form {
    padding: 15px;
}

.selected-member {
    display: inline-block;
    margin: 3px;
}

.selected-member > div {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    background: #333;
    border-radius: 15px;
    font-size: 12px;
}

.selected-member span:last-child {
    color: #ed4956;
    cursor: pointer;
    font-weight: bold;
}

/* Messages Tabs */
.messages-tabs {
    display: flex;
    background: #1a1a1a;
    border-radius: 8px;
    margin: 10px 15px;
    padding: 4px;
}

.messages-tab {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    color: #888;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s;
}

.messages-tab.active {
    background: #fff;
    color: #000;
}

.messages-tab i {
    margin-right: 5px;
}

/* Create Group Button */
.create-group-btn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: #E1306C;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(225, 48, 108, 0.3);
    z-index: 99;
}

/* Groups Container */
.groups-container {
    padding: 10px;
    overflow-y: auto;
    height: calc(100vh - 180px);
}

/* Group Item */
.group-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid #333;
    cursor: pointer;
    transition: background 0.2s;
}

.group-item:hover {
    background: #1a1a1a;
}

.group-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(45deg, #405DE6, #C13584);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 20px;
    flex-shrink: 0;
}

.group-info {
    flex: 1;
}

.group-name {
    font-weight: 600;
    color: white;
    font-size: 16px;
    margin-bottom: 5px;
}

.group-last-message {
    font-size: 14px;
    color: #8e8e8e;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.group-details {
    text-align: right;
}

.group-members {
    font-size: 12px;
    color: #8e8e8e;
    margin-bottom: 5px;
}

.group-time {
    font-size: 11px;
    color: #666;
}