#container {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

#container #feed-posts {
    flex: 1;
    max-width: 800px;
}

#container #user-friends {
    width: 300px;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: fit-content;
    position: sticky;
    top: 100px;
}

#user-friends h4 {
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

#user-friends p {
    margin: 0 0 10px 0;
}

#user-friends a {
    text-decoration: none;
    color: #333;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: #f8f9fa;
    border: 1px solid transparent;
    width: 100%;
    min-height: 48px;
}

#user-friends a:hover {
    background: rgba(102, 126, 234, 0.08);
    border-color: #dbeafe;
    transform: translateX(3px);
    box-shadow: 0 1px 4px rgba(102, 126, 234, 0.08);
}

img {
    height: 40px;
    width: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #667eea;
}

#new-post-form {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

#new-post-form h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.3rem;
    font-weight: 600;
}

textarea {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#new-post-form input[type="submit"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    margin-top: 15px;
    transition: all 0.3s ease;
}

#new-post-form input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

#post-wrapper {
    background: white;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

#post-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

#post-wrapper a {
    text-decoration: none;
    color: inherit;
}

/* Post header */
.post-header {
    padding: 20px 25px 15px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.post-author-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
}

.post-author-info {
    flex: 1;
}

.post-author-name {
    font-weight: 600;
    color: #333;
    margin: 0;
    font-size: 16px;
}

.post-timestamp {
    color: #666;
    font-size: 12px;
    margin: 2px 0 0 0;
}

/* Post content */
.post-content {
    padding: 20px 25px;
    line-height: 1.6;
    color: #333;
}

.post-text {
    margin: 0 0 15px 0;
    font-size: 15px;
}

/* Post actions */
.post-actions {
    padding: 15px 25px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 20px;
    align-items: center;
}

.action-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.action-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.action-btn.liked {
    color: #e74c3c;
}

/* Comments section */
.comments-section {
    background: #f8f9fa;
    padding: 20px 25px;
    border-top: 1px solid #f0f0f0;
}

.comment {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 3px solid #667eea;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.comment-timestamp {
    color: #666;
    font-size: 12px;
}

.comment-text {
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

/* Add comment form */
.add-comment-form {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.add-comment-form input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #e1e5e9;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.add-comment-form input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.add-comment-form button {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.add-comment-form button:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

/* Avatar fallback styles */
.post-author-avatar-container,
.comment-author-avatar-container,
.friend-avatar-container {
    position: relative;
    display: inline-block;
    margin-right: 8px;
}

.post-author-avatar,
.comment-author-avatar,
.friend-avatar {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #667eea;
}

.post-author-avatar-fallback,
.comment-author-avatar-fallback,
.friend-avatar-fallback {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid #667eea;
    display: none; /* Hidden by default, shown when image fails */
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    color: white;
    text-transform: uppercase;
}

/* Friends section avatar styles */
.friend-avatar-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.friend-avatar,
.friend-avatar-fallback {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    object-fit: cover;
}

.friend-avatar {
    background: none;
    color: inherit;
    font-size: inherit;
    justify-content: inherit;
    align-items: inherit;
    display: block;
}

.friend-avatar-fallback {
    display: none; /* shown only if image fails */
}

.friend-profile-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.friend-username {
    font-weight: 500;
    font-size: 15px;
    color: #333;
    white-space: nowrap;
    flex: 1;
}

.friend-like-icon {
    color: #667eea;
    font-size: 16px;
    margin-left: auto;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}
#user-friends a:hover .friend-like-icon {
    color: #764ba2;
}