* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-red: #191d27;
    --dark-red: #3794ff;
    --light-red: #6babff;
    --background: #f5f6fa;
    --card-bg: #ffffff;
    --text-primary: #191d27;
    --text-secondary: #a4b0be;
    --border-color: #dfe4ea;
    --success: #2ed573;
    --warning: #ffa502;
    --danger: #ff6b81;
    --online-green: #2ed573;
    --offline-gray: #bdc3c7;
}

body {
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    color: white;
}

.search-bar {
    flex: 1;
    max-width: 500px;
    margin: 0 20px;
}

.search-bar input {
    width: 100%;
    padding: 10px 15px;
    border: none;
    border-radius: 20px;
    background: rgba(255,255,255,0.2);
    color: white;
    font-size: 1rem;
    outline: none;
}

.search-bar input::placeholder {
    color: rgba(255,255,255,0.7);
}

.nav-icons {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-icons i {
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.2s;
    position: relative;
}

.nav-icons i:hover {
    transform: scale(1.1);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--success);
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--light-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    position: relative;
}

.online-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background: var(--online-green);
    border: 2px solid white;
    border-radius: 50%;
}

/* Main Content Layout */
.main-content {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 20px;
    padding: 20px 0;
    min-height: calc(100vh - 120px);
}

/* Sidebar Styles */
.sidebar {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    height: fit-content;
}

.sidebar h3 {
    margin-bottom: 15px;
    color: var(--primary-red);
    font-size: 1.2rem;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    cursor: pointer;
    transition: color 0.2s;
}

.sidebar-item:hover {
    color: var(--primary-red);
}

.sidebar-item i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Friends list */
.friends-list {
    margin-top: 20px;
}

.friends-list h4 {
    margin-bottom: 10px;
    color: var(--primary-red);
}

.friend-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    cursor: pointer;
}

.friend-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--light-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
    color: white;
    margin-right: 10px;
    position: relative;
}

.friend-status {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 2px solid white;
}

.friend-online {
    background: var(--online-green);
}

.friend-offline {
    background: var(--offline-gray);
}

.friend-name {
    font-size: 0.9rem;
}

/* Feed Styles */
.feed {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.create-post {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.create-post textarea {
    width: 100%;
    min-height: 100px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 15px;
    resize: vertical;
    font-size: 1rem;
    margin-bottom: 15px;
    outline: none;
}

.create-post textarea:focus {
    border-color: var(--primary-red);
}

.media-preview {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.media-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--border-color);
}

.media-item img, .media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-media {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-options {
    display: flex;
    gap: 15px;
}

.post-option {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.post-option:hover {
    color: var(--primary-red);
}

.post-btn {
    background: var(--primary-red);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

.post-btn:hover {
    background: var(--dark-red);
}

.post {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    animation: fadeIn 0.3s ease-in;
    position: relative;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--light-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 10px;
    color: white;
}

.post-user-info {
    flex: 1;
}

.post-username {
    font-weight: bold;
    margin-bottom: 3px;
}

.post-time {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.post-menu {
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
    color: var(--text-secondary);
}

.post-menu:hover {
    color: var(--primary-red);
}

.post-content {
    margin-bottom: 15px;
    line-height: 1.6;
}

.post-feeling {
    display: inline-block;
    background: rgba(255, 71, 87, 0.1);
    color: var(--primary-red);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.post-media {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.post-media img, .post-media video {
    max-width: 100%;
    max-height: 300px;
    border-radius: 10px;
    object-fit: cover;
}

.post-stats {
    display: flex;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.stat-item:hover {
    color: var(--primary-red);
}

.stat-count {
    font-weight: bold;
    color: var(--text-primary);
}

/* Liked/Shared indicators */
.liked {
    color: var(--primary-red) !important;
}

.shared {
    color: var(--primary-red) !important;
}

/* Comments section */
.comments-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.comment-input {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.comment-input input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    outline: none;
    font-size: 0.9rem;
}

.comment-input input:focus {
    border-color: var(--primary-red);
}

.comment-input button {
    background: var(--primary-red);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 0.9rem;
}

.comments-list {
    margin-top: 10px;
}

.comment {
    display: flex;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.comment:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.comment-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--light-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
    color: white;
    margin-right: 10px;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 3px;
}

.comment-username {
    font-weight: bold;
    font-size: 0.9rem;
}

.comment-time {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-left: 5px;
}

.comment-text {
    font-size: 0.9rem;
    line-height: 1.4;
}

.comment-actions {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.comment-action {
    font-size: 0.8rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.comment-action:hover {
    color: var(--primary-red);
}

/* Poll feature */
.poll-container {
    background: rgba(255, 71, 87, 0.05);
    border-radius: 10px;
    padding: 15px;
    margin: 10px 0;
}

.poll-question {
    font-weight: bold;
    margin-bottom: 10px;
}

.poll-option {
    padding: 8px 12px;
    margin: 5px 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.poll-option:hover {
    border-color: var(--primary-red);
}

.poll-option.selected {
    background: rgba(255, 71, 87, 0.1);
    border-color: var(--primary-red);
}

.poll-results {
    margin-top: 10px;
    font-size: 0.9rem;
}

.poll-bar {
    height: 6px;
    background: var(--light-red);
    border-radius: 3px;
    margin-top: 3px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.messages-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    padding: 10px;
    border-radius: 10px;
    max-width: 80%;
}

.message.sent {
    background: var(--light-red);
    color: white;
    margin-left: auto;
}

.message.received {
    background: var(--border-color);
    color: var(--text-primary);
}

.message-input {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.message-input input {
    flex: 1;
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: 20px;
    outline: none;
}

.message-input input:focus {
    border-color: var(--primary-red);
}

.message-input button {
    background: var(--primary-red);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 20px;
    cursor: pointer;
}

/* File input styling */
.file-input-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.file-input-wrapper input[type=file] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* Notification dropdown */
.notification-dropdown {
    position: absolute;
    top: 60px;
    right: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    width: 300px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.notification-item {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
}

.notification-item:hover {
    background: rgba(255, 71, 87, 0.1);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-text {
    font-size: 0.9rem;
}

.notification-time {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 3px;
}

/* Mark as read indicator */
.unread {
    background: rgba(255, 71, 87, 0.05);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .sidebar, .trending {
        display: none;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-bar {
        margin: 0;
        width: 100%;
    }
    
    .nav-icons {
        width: 100%;
        justify-content: center;
    }
}