/* Profile Page Styles */

.home-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Profile Header Section */
.profile-content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.profile-header-section {
    padding: 30px;
    border-bottom: 1px solid #e1e8ed;
}

.profile-avatar-info {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.profile-avatar-wrapper {
    flex-shrink: 0;
}

.profile-avatar-wrapper img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #f5f8fa;
}

.profile-info-section {
    flex: 1;
    min-width: 0;
}

.profile-username {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.role-badge {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Profile Meta */
.profile-meta {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    color: #657786;
    font-size: 14px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-item i {
    font-size: 16px;
}

.meta-item .label {
    font-weight: 500;
}

.meta-item .value {
    color: #14171a;
    font-weight: 600;
}

.meta-item.follows-you {
    background: #f5f8fa;
    padding: 4px 12px;
    border-radius: 12px;
}

/* Profile Stats */
.profile-stats {
    display: flex;
    gap: 24px;
    margin-top: 16px;
}

.profile-stat {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

.profile-stat:hover {
    color: #1da1f2;
}

.profile-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #14171a;
    margin-right: 4px;
}

.profile-stat-label {
    font-size: 14px;
    color: #657786;
}

/* Profile Actions */
.profile-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    align-items: center;
}

.btn {
    padding: 10px 24px;
    border-radius: 24px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-secondary {
    background: #14171a;
    color: #fff;
}

.btn-secondary:hover {
    background: #2c3135;
}

.btn-secondary:disabled {
    background: #e1e8ed;
    color: #657786;
    cursor: not-allowed;
}

.btn-follow {
    background: #1da1f2;
    color: #fff;
}

.btn-follow:hover {
    background: #1a91da;
}

.btn-unfollow {
    background: #fff;
    color: #14171a;
    border: 1px solid #cfd9de;
}

.btn-unfollow:hover {
    background: #fee;
    border-color: #f4212e;
    color: #f4212e;
}

.btn-unfollow:hover .btn-text::before {
    content: "Unfollow";
}

.btn-unfollow .btn-text::before {
    content: "Following";
}

.btn-chat {
    background: #10b981;
    color: #fff;
}

.btn-chat:hover {
    background: #059669;
}

/* Karma Badges */
.karma-badges {
    display: flex;
    gap: 16px;
    padding: 20px 30px;
    background: linear-gradient(135deg, #f5f8fa 0%, #e1e8ed 100%);
}

.karma-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
    padding: 12px 20px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.karma-badge.upvote {
    color: #ff4500;
}

.karma-badge.downvote {
    color: #7193ff;
}

.karma-badge i {
    font-size: 24px;
}

/* Friend Requests */
.friends {
    padding: 0 30px 30px;
}

.friends h3 {
    margin-bottom: 16px;
}

.list-group-item {
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    margin-bottom: 8px;
}

/* Tabs */
.nav-tabs {
    border: none;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 8px;
    display: flex;
    gap: 4px;
}

.nav-tabs .nav-item {
    flex: 1;
}

.nav-tabs .nav-link {
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    color: #657786;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s;
    width: 100%;
}

.nav-tabs .nav-link:hover {
    background: #f5f8fa;
    color: #14171a;
}

.nav-tabs .nav-link.active {
    background: #1da1f2;
    color: #fff;
}

/* Tab Content */
.tab-content {
    margin-top: 20px;
}

/* Post Items */
.post-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
}

.post-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.post-avatar {
    flex-shrink: 0;
}

.post-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.post-content {
    flex: 1;
    min-width: 0;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.post-username {
    font-weight: 700;
    color: #14171a;
}

.post-time {
    color: #657786;
    font-size: 14px;
}

.post-text {
    color: #14171a;
    font-size: 15px;
    line-height: 1.5;
    margin: 0 0 8px 0;
    word-wrap: break-word;
}

.metrics {
    display: flex;
    gap: 16px;
    color: #657786;
    font-size: 14px;
}

.metrics i {
    margin-right: 4px;
}

/* Image Grid Tab */
.image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.image-grid-item {
    position: relative;
    padding-bottom: 100%;
    overflow: hidden;
    background: #f5f8fa;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.image-grid-item:hover {
    opacity: 0.9;
}

.image-grid-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-grid-empty {
    text-align: center;
    padding: 60px 20px;
    color: #657786;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.image-grid-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
}

.image-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.image-modal-content img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.image-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 36px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
}

.image-modal-close:hover {
    opacity: 0.7;
}

/* Private Profile Message */
.private-profile-message {
    text-align: center;
    padding: 60px 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.private-profile-icon {
    font-size: 64px;
    color: #657786;
    margin-bottom: 20px;
}

.private-profile-message h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #14171a;
}

.private-profile-message p {
    color: #657786;
    font-size: 16px;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Friend List Styles */
.friend-header {
    padding: 24px;
    text-align: center;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.friend-card {
    transition: all 0.2s;
    border: 1px solid #e1e8ed;
    border-radius: 12px;
}

.friend-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.friend-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 12px;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-close {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    padding: 8px;
    opacity: 0.6;
    transition: all 0.2s;
}

.btn-close:hover {
    background: rgba(244, 33, 46, 0.1);
    opacity: 1;
}

.btn-outline-primary {
    border: 2px solid #1da1f2;
    color: #1da1f2;
    background: transparent;
    padding: 10px 24px;
    border-radius: 24px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
}

.btn-outline-primary:hover {
    background: #1da1f2;
    color: #fff;
}

/* Pagination */
.pagination {
    margin-top: 20px;
}

.page-link {
    border: 1px solid #e1e8ed;
    color: #1da1f2;
    border-radius: 8px;
    margin: 0 4px;
    padding: 8px 16px;
    font-weight: 600;
}

.page-link:hover {
    background: #f5f8fa;
    border-color: #1da1f2;
}

.page-item.disabled .page-link {
    background: #fff;
    border-color: #e1e8ed;
    color: #657786;
}

/* Responsive Design */
@media (max-width: 768px) {
    .profile-avatar-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .profile-stats {
        justify-content: center;
    }
    
    .profile-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .image-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .karma-badges {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .home-content {
        padding: 12px;
    }
    
    .profile-header-section {
        padding: 20px;
    }
    
    .profile-avatar-wrapper img {
        width: 90px;
        height: 90px;
    }
    
    .profile-username {
        font-size: 22px;
    }
    
    .profile-meta {
        gap: 12px;
        font-size: 13px;
    }
    
    .image-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}