/**
 * Enhanced Profile Page CSS
 * Activity Timeline, Achievements, Skills, Stats
 */

/* ===========================================
   PROFILE HEADER ENHANCEMENTS
   =========================================== */

.profile-header-enhanced {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    border-radius: 24px;
    padding: 32px;
    color: #fff;
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
}

.profile-header-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    transform: translate(30%, -30%);
    pointer-events: none;
}

.profile-header-enhanced::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    transform: translate(-30%, 30%);
    pointer-events: none;
}

.profile-header-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

.profile-avatar-enhanced {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 700;
    overflow: hidden;
    border: 4px solid rgba(255,255,255,0.3);
    flex-shrink: 0;
}

.profile-avatar-enhanced img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info-enhanced {
    flex: 1;
}

.profile-name-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.profile-name {
    font-size: 28px;
    font-weight: 800;
    margin: 0;
}

.profile-verified-badge {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-verified-badge svg {
    width: 14px;
    height: 14px;
}

.profile-username {
    font-size: 16px;
    opacity: 0.8;
    margin-bottom: 12px;
}

.profile-bio-enhanced {
    font-size: 15px;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 16px;
    max-width: 500px;
}

/* Profile Tags */
.profile-tags-enhanced {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.profile-tag-enhanced {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile-tag-enhanced.role {
    background: rgba(99, 102, 241, 0.3);
}

.profile-tag-enhanced.budget {
    background: rgba(16, 185, 129, 0.3);
}

.profile-tag-enhanced.experience {
    background: rgba(251, 191, 36, 0.3);
}

/* Profile Actions */
.profile-actions-enhanced {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.profile-action-btn {
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.profile-action-btn.primary {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
}

.profile-action-btn.primary:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.profile-action-btn.secondary {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
}

.profile-action-btn.secondary:hover {
    background: rgba(255,255,255,0.1);
}

/* ===========================================
   PROFILE STATS GRID
   =========================================== */

.profile-stats-enhanced {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card-enhanced {
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card-enhanced:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.stat-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-number-enhanced {
    font-size: 28px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 4px;
}

.stat-label-enhanced {
    font-size: 14px;
    color: #64748b;
}

.stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
    padding: 4px 8px;
    border-radius: 6px;
}

.stat-trend.up {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.stat-trend.down {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* ===========================================
   PROFILE TABS
   =========================================== */

.profile-tabs {
    display: flex;
    gap: 4px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 14px;
    margin-bottom: 24px;
}

.profile-tab {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.profile-tab:hover {
    color: #1e293b;
}

.profile-tab.active {
    background: #fff;
    color: #6366f1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.profile-tab-icon {
    width: 18px;
    height: 18px;
}

/* ===========================================
   PROFILE CONTENT SECTIONS
   =========================================== */

.profile-section {
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    margin-bottom: 24px;
}

.profile-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.profile-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-section-title-icon {
    font-size: 20px;
}

.profile-section-action {
    font-size: 14px;
    color: #6366f1;
    text-decoration: none;
    font-weight: 600;
}

.profile-section-action:hover {
    text-decoration: underline;
}

/* ===========================================
   ACTIVITY TIMELINE
   =========================================== */

.profile-activity-timeline {
    position: relative;
    padding-left: 28px;
}

.profile-activity-timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #6366f1 0%, #e2e8f0 100%);
}

.activity-timeline-item {
    position: relative;
    padding-bottom: 24px;
}

.activity-timeline-item:last-child {
    padding-bottom: 0;
}

.activity-timeline-dot {
    position: absolute;
    left: -22px;
    top: 4px;
    width: 16px;
    height: 16px;
    background: #fff;
    border: 3px solid #6366f1;
    border-radius: 50%;
    z-index: 1;
}

.activity-timeline-item.post .activity-timeline-dot {
    border-color: #6366f1;
}

.activity-timeline-item.comment .activity-timeline-dot {
    border-color: #10b981;
}

.activity-timeline-item.like .activity-timeline-dot {
    border-color: #f43f5e;
}

.activity-timeline-item.achievement .activity-timeline-dot {
    border-color: #f59e0b;
}

.activity-timeline-content {
    background: #f8fafc;
    padding: 16px 20px;
    border-radius: 14px;
    transition: background 0.2s;
}

.activity-timeline-content:hover {
    background: #f1f5f9;
}

.activity-timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.activity-timeline-type {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.activity-timeline-type-icon {
    font-size: 14px;
}

.activity-timeline-date {
    font-size: 13px;
    color: #94a3b8;
}

.activity-timeline-title {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.activity-timeline-excerpt {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
}

/* ===========================================
   ACHIEVEMENTS GRID
   =========================================== */

.profile-achievements-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.achievement-badge {
    text-align: center;
    padding: 24px 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 20px;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.achievement-badge:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.achievement-badge.locked {
    opacity: 0.5;
    filter: grayscale(1);
}

.achievement-badge.rare {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(245, 158, 11, 0.1) 100%);
}

.achievement-badge.epic {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
}

.achievement-badge.legendary {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.1) 0%, rgba(244, 63, 94, 0.1) 100%);
}

.achievement-badge-icon {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
}

.achievement-badge-name {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.achievement-badge-desc {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 8px;
}

.achievement-badge-date {
    font-size: 11px;
    color: #94a3b8;
}

.achievement-badge-progress {
    margin-top: 12px;
}

.achievement-progress-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.achievement-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 3px;
    transition: width 0.3s;
}

.achievement-progress-text {
    font-size: 11px;
    color: #64748b;
    margin-top: 6px;
}

/* ===========================================
   SKILLS SECTION
   =========================================== */

.profile-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.profile-skill-tag {
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    color: #6366f1;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.profile-skill-tag:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    transform: translateY(-2px);
}

.skill-level {
    font-size: 10px;
    padding: 2px 6px;
    background: #6366f1;
    color: #fff;
    border-radius: 10px;
}

/* ===========================================
   RECENT POSTS
   =========================================== */

.profile-posts-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profile-post-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 14px;
    transition: all 0.2s;
    text-decoration: none;
}

.profile-post-item:hover {
    background: #f1f5f9;
    transform: translateX(4px);
}

.profile-post-thumbnail {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    border-radius: 12px;
    flex-shrink: 0;
    overflow: hidden;
}

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

.profile-post-content {
    flex: 1;
    min-width: 0;
}

.profile-post-title {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-post-excerpt {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.profile-post-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
    font-size: 13px;
    color: #94a3b8;
}

.profile-post-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ===========================================
   EMPTY STATES
   =========================================== */

.profile-empty-state {
    text-align: center;
    padding: 48px 24px;
}

.profile-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.profile-empty-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.profile-empty-text {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 20px;
}

.profile-empty-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.profile-empty-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

/* ===========================================
   RESPONSIVE
   =========================================== */

@media (max-width: 1024px) {
    .profile-stats-enhanced {
        grid-template-columns: repeat(2, 1fr);
    }

    .profile-achievements-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .profile-header-content {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .profile-avatar-enhanced {
        width: 100px;
        height: 100px;
    }

    .profile-name {
        font-size: 24px;
    }

    .profile-name-row {
        justify-content: center;
    }

    .profile-tags-enhanced {
        justify-content: center;
    }

    .profile-actions-enhanced {
        justify-content: center;
    }

    .profile-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .profile-tab {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .profile-achievements-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .activity-timeline-content {
        padding: 14px 16px;
    }
}

@media (max-width: 480px) {
    .profile-header-enhanced {
        padding: 24px 16px;
    }

    .profile-stats-enhanced {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .stat-card-enhanced {
        padding: 16px;
    }

    .stat-number-enhanced {
        font-size: 24px;
    }

    .profile-achievements-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .achievement-badge {
        padding: 16px 12px;
    }

    .achievement-badge-icon {
        font-size: 36px;
    }
}
