/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #fafafa;
    color: #262626;
    line-height: 1.6;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid #dbdbdb;
    z-index: 1000;
    padding: 0 20px;
}

.nav-container {
    max-width: 975px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.nav-logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    color: #262626;
}

.nav-logo i {
    margin-right: 8px;
    color: #0095f6;
}

.nav-search {
    display: flex;
    align-items: center;
    background: #fafafa;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    padding: 8px 16px;
    width: 300px;
}

.nav-search input {
    border: none;
    background: none;
    outline: none;
    width: 100%;
    font-size: 14px;
}

.nav-search button {
    background: none;
    border: none;
    color: #8e8e8e;
    cursor: pointer;
    margin-left: 8px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #262626;
    font-size: 12px;
    transition: color 0.3s;
}

.nav-link i {
    font-size: 24px;
    margin-bottom: 4px;
}

.nav-link:hover,
.nav-link.active {
    color: #0095f6;
}

/* Main Content */
.main-content {
    margin-top: 60px;
    min-height: calc(100vh - 60px);
}

.page {
    display: none;
    max-width: 975px;
    margin: 0 auto;
    padding: 20px;
}

.page.active {
    display: flex;
    gap: 32px;
}

/* Home Page */
.content-feed {
    flex: 1;
    max-width: 614px;
}

.sidebar {
    width: 293px;
    position: sticky;
    top: 80px;
    height: fit-content;
}

/* Stories */
.stories-container {
    background: white;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
    display: flex;
    gap: 16px;
    overflow-x: auto;
}

.story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    min-width: 80px;
}

.story-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    border: 2px solid white;
}

.story-avatar img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.story-avatar i {
    color: white;
    font-size: 20px;
}

.story-item span {
    font-size: 12px;
    color: #262626;
    text-align: center;
}

/* Posts */
.posts-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.post {
    background: white;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    overflow: hidden;
}

.post-header {
    display: flex;
    align-items: center;
    padding: 14px;
    gap: 12px;
}

.post-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.post-user-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.post-user-info p {
    font-size: 12px;
    color: #8e8e8e;
}

.post-content {
    position: relative;
}

.post-media {
    width: 100%;
    max-height: 600px;
    object-fit: cover;
}

.post-video {
    width: 100%;
    max-height: 600px;
}

.post-actions {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.action-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #262626;
    cursor: pointer;
    transition: color 0.3s;
}

.action-btn:hover {
    color: #0095f6;
}

.action-btn.liked {
    color: #ed4956;
}

.post-likes {
    padding: 0 16px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.post-caption {
    padding: 0 16px;
    margin-bottom: 8px;
}

.post-caption strong {
    font-weight: 600;
}

.post-comments {
    padding: 0 16px;
    margin-bottom: 8px;
}

.post-comment {
    margin-bottom: 4px;
    font-size: 14px;
}

.post-comment strong {
    font-weight: 600;
}

.post-timestamp {
    padding: 0 16px 12px;
    font-size: 12px;
    color: #8e8e8e;
    text-transform: uppercase;
}

/* Sidebar */
.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.profile-img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.user-info p {
    font-size: 12px;
    color: #8e8e8e;
}

.suggestions h4 {
    font-size: 14px;
    font-weight: 600;
    color: #8e8e8e;
    margin-bottom: 16px;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.suggestion-item img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.suggestion-info {
    flex: 1;
}

.suggestion-info h5 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.suggestion-info p {
    font-size: 12px;
    color: #8e8e8e;
}

.follow-btn {
    background: none;
    border: none;
    color: #0095f6;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

/* Explore Page */
.explore-grid {
    width: 100%;
}

.explore-filters {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    justify-content: center;
}

.filter-btn {
    background: none;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active {
    background: #0095f6;
    color: white;
}

.explore-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* Create Page */
.create-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.create-container h2 {
    text-align: center;
    margin-bottom: 32px;
}

.create-form {
    background: white;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    padding: 32px;
}

.upload-area {
    border: 2px dashed #dbdbdb;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s;
    margin-bottom: 24px;
}

.upload-area:hover {
    border-color: #0095f6;
}

.upload-area i {
    font-size: 48px;
    color: #8e8e8e;
    margin-bottom: 16px;
}

.upload-area p {
    color: #8e8e8e;
    font-size: 16px;
}

.upload-area input {
    display: none;
}

.form-group {
    margin-bottom: 24px;
}

.form-group textarea,
.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #dbdbdb;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
}

.form-group textarea {
    min-height: 100px;
}

.form-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #0095f6;
    color: white;
}

.btn-primary:hover {
    background: #0081d6;
}

.btn-secondary {
    background: #fafafa;
    color: #262626;
    border: 1px solid #dbdbdb;
}

.btn-secondary:hover {
    background: #f0f0f0;
}

/* Notifications Page */
.notifications-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.notifications-container h2 {
    margin-bottom: 24px;
}

.notification-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: white;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    margin-bottom: 12px;
}

.notification-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.notification-content {
    flex: 1;
}

.notification-text {
    font-size: 14px;
    margin-bottom: 4px;
}

.notification-time {
    font-size: 12px;
    color: #8e8e8e;
}

/* Profile Page */
.profile-container {
    width: 100%;
}

.profile-header {
    display: flex;
    gap: 32px;
    margin-bottom: 32px;
    padding: 32px;
    background: white;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
}

.profile-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-info h2 {
    margin-bottom: 8px;
}

.profile-info p {
    color: #8e8e8e;
    margin-bottom: 16px;
}

.bio {
    margin-bottom: 24px !important;
}

.profile-stats {
    display: flex;
    gap: 32px;
    margin-bottom: 24px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 18px;
    font-weight: 600;
}

.stat-label {
    font-size: 12px;
    color: #8e8e8e;
}

.profile-tabs {
    display: flex;
    border-bottom: 1px solid #dbdbdb;
    margin-bottom: 24px;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.tab-btn.active {
    border-bottom-color: #262626;
}

.tab-btn i {
    margin-right: 8px;
}

.profile-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid #dbdbdb;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #8e8e8e;
}

.modal-body {
    padding: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-search {
        display: none;
    }
    
    .page.active {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: static;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-stats {
        justify-content: center;
    }
    
    .explore-content {
        grid-template-columns: 1fr;
    }
    
    .profile-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .nav-menu {
        gap: 16px;
    }
    
    .nav-link span {
        display: none;
    }
    
    .stories-container {
        padding: 12px;
    }
    
    .story-item {
        min-width: 60px;
    }
    
    .story-avatar {
        width: 50px;
        height: 50px;
    }
    
    .story-avatar img {
        width: 46px;
        height: 46px;
    }
}

/* Notification System */
.notification-container {
    position: fixed;
    top: 60px;
    right: 20px;
    width: 350px;
    max-height: 500px;
    background: white;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    display: none;
}

.notification-container.show {
    display: block;
}

.notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid #dbdbdb;
}

.notification-header h3 {
    font-size: 16px;
    color: #262626;
}

.notification-count {
    background: #ed4956;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.mark-all-read {
    background: none;
    border: none;
    color: #0095f6;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.mark-all-read:hover {
    background-color: #f0f8ff;
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.3s;
    position: relative;
}

.notification-item:hover {
    background-color: #fafafa;
}

.notification-item.unread {
    background-color: #f0f8ff;
}

.notification-item.unread:hover {
    background-color: #e6f3ff;
}

.notification-avatar {
    position: relative;
    margin-right: 12px;
}

.notification-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.notification-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #0095f6;
    border-radius: 50%;
}

.no-notifications {
    padding: 40px 20px;
    text-align: center;
    color: #8e8e8e;
    font-size: 14px;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: white;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1002;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    border-left: 4px solid #28a745;
}

.toast-error {
    border-left: 4px solid #dc3545;
}

.toast-info {
    border-left: 4px solid #0095f6;
}

.toast-warning {
    border-left: 4px solid #ffc107;
}

/* Messaging System */
.messaging-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: white;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    display: none;
    flex-direction: column;
}

.messaging-container.show {
    display: flex;
}

.messaging-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid #dbdbdb;
    background: #fafafa;
    border-radius: 8px 8px 0 0;
}

.messaging-header h3 {
    font-size: 16px;
    color: #262626;
}

.new-message-btn {
    background: #0095f6;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.new-message-btn:hover {
    background: #0081d6;
}

.messaging-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.conversations-list {
    width: 40%;
    border-right: 1px solid #dbdbdb;
    overflow-y: auto;
}

.conversation-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.3s;
    position: relative;
}

.conversation-item:hover {
    background-color: #fafafa;
}

.conversation-item.active {
    background-color: #e6f3ff;
}

.conversation-avatar {
    position: relative;
    margin-right: 8px;
}

.conversation-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.online-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #28a745;
    border: 2px solid white;
    border-radius: 50%;
}

.conversation-content {
    flex: 1;
    min-width: 0;
}

.conversation-name {
    font-size: 14px;
    font-weight: 500;
    color: #262626;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-last-message {
    font-size: 12px;
    color: #8e8e8e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-time {
    font-size: 10px;
    color: #c7c7c7;
    margin-top: 2px;
}

.unread-badge {
    background: #ed4956;
    color: white;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    padding: 0 4px;
}

.messages-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.no-conversation-selected {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #8e8e8e;
    font-size: 14px;
}

.no-conversation-selected i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #c7c7c7;
}

.messages-header {
    padding: 12px 16px;
    border-bottom: 1px solid #dbdbdb;
    background: #fafafa;
}

.messages-participant {
    display: flex;
    align-items: center;
}

.messages-participant img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 8px;
    object-fit: cover;
}

.online-status {
    font-size: 12px;
    color: #28a745;
    margin-left: 8px;
}

.messages-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.message {
    display: flex;
    margin-bottom: 12px;
}

.message.own {
    justify-content: flex-end;
}

.message-content {
    max-width: 70%;
    padding: 8px 12px;
    border-radius: 18px;
    position: relative;
}

.message.own .message-content {
    background: #0095f6;
    color: white;
    border-bottom-right-radius: 4px;
}

.message.other .message-content {
    background: #f0f0f0;
    color: #262626;
    border-bottom-left-radius: 4px;
}

.message-text {
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.message-time {
    font-size: 10px;
    opacity: 0.7;
    margin-top: 4px;
    text-align: right;
}

.message-input-area {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-top: 1px solid #dbdbdb;
    background: #fafafa;
}

.message-input-area textarea {
    flex: 1;
    border: 1px solid #dbdbdb;
    border-radius: 20px;
    padding: 8px 12px;
    resize: none;
    font-size: 14px;
    outline: none;
    max-height: 80px;
}

.message-input-area button {
    background: #0095f6;
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    margin-left: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.message-input-area button:hover {
    background: #0081d6;
}

.no-conversations {
    padding: 40px 20px;
    text-align: center;
    color: #8e8e8e;
    font-size: 14px;
} 