/** Extracted page styles for profile.php; isolated from shared shell components. */
/* =========================================================
   PROFILE - Following style-1.css Light Mode Design
   ========================================================= */

body.asset-page-profile .main-wrapper .profile-container{
    padding-bottom: var(--spacing-2xl);
}

/* Profile Header with Cover */
body.asset-page-profile .main-wrapper .profile-header{
    background: var(--bg-primary);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--spacing-xl);
    overflow: hidden;
}

body.asset-page-profile .main-wrapper .profile-cover{
    height: 180px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    position: relative;
}

body.asset-page-profile .main-wrapper .profile-cover-gradient{
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.2) 100%);
}

body.asset-page-profile .main-wrapper .profile-header-content{
    display: flex;
    gap: var(--spacing-xl);
    padding: 0 var(--spacing-2xl) var(--spacing-xl);
    margin-top: -60px;
    position: relative;
}

/* Profile Avatar */
body.asset-page-profile .main-wrapper .profile-avatar-wrapper{
    position: relative;
    flex-shrink: 0;
}

body.asset-page-profile .main-wrapper .profile-avatar{
    width: 140px;
    height: 140px;
    border-radius: var(--radius-full);
    border: 5px solid var(--bg-primary);
    object-fit: cover;
    box-shadow: var(--shadow-lg);
}

body.asset-page-profile .main-wrapper .online-indicator{
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    background: var(--success);
    border: 3px solid var(--bg-primary);
    border-radius: var(--radius-full);
}

/* Profile Info */
body.asset-page-profile .main-wrapper .profile-info{
    flex: 1;
    min-width: 0;
    padding-top: var(--spacing-lg);
}

body.asset-page-profile .main-wrapper .profile-name-section{
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    margin-bottom: var(--spacing-xs);
}

body.asset-page-profile .main-wrapper .profile-name{
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

body.asset-page-profile .main-wrapper .profile-badges-inline{
    display: flex;
    gap: var(--spacing-sm);
}

body.asset-page-profile .main-wrapper .user-badge{
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    font-weight: 600;
}

body.asset-page-profile .main-wrapper .badge-admin{
    background: var(--danger-light);
    color: var(--danger);
}

body.asset-page-profile .main-wrapper .badge-expert{
    background: var(--primary-light);
    color: var(--primary);
}

body.asset-page-profile .main-wrapper .profile-username{
    color: var(--text-muted);
    margin-bottom: var(--spacing-sm);
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

body.asset-page-profile .main-wrapper .profile-bio{
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    font-size: 0.9375rem;
    line-height: 1.6;
}

body.asset-page-profile .main-wrapper .profile-meta{
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md) var(--spacing-xl);
}

body.asset-page-profile .main-wrapper .profile-meta-item{
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

body.asset-page-profile .main-wrapper .profile-meta-item i{
    color: var(--text-muted);
}

body.asset-page-profile .main-wrapper .profile-meta-item a{
    color: var(--primary);
}

/* Profile Actions */
body.asset-page-profile .main-wrapper .profile-actions{
    padding-top: var(--spacing-lg);
    flex-shrink: 0;
}

/* Profile Grid */
body.asset-page-profile .main-wrapper .profile-grid{
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--spacing-xl);
}

body.asset-page-profile .main-wrapper .profile-main{
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

/* Stats Grid */
body.asset-page-profile .main-wrapper .stats-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--spacing-lg);
}

body.asset-page-profile .main-wrapper .stat-card{
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    border: 1px solid var(--border-medium);
    position: relative;
    overflow: hidden;
}

body.asset-page-profile .main-wrapper .stat-card::before{
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
}

body.asset-page-profile .main-wrapper .stat-card:hover{
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

body.asset-page-profile .main-wrapper .stat-card-primary::before{ background: var(--primary); }
body.asset-page-profile .main-wrapper .stat-card-success::before{ background: var(--success); }
body.asset-page-profile .main-wrapper .stat-card-info::before{ background: var(--info); }
body.asset-page-profile .main-wrapper .stat-card-warning::before{ background: var(--warning); }

body.asset-page-profile .main-wrapper .stat-icon{
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

body.asset-page-profile .main-wrapper .stat-card-primary .stat-icon{
    background: var(--primary-light);
    color: var(--primary);
}

body.asset-page-profile .main-wrapper .stat-card-success .stat-icon{
    background: var(--success-light);
    color: var(--success);
}

body.asset-page-profile .main-wrapper .stat-card-info .stat-icon{
    background: var(--info-light);
    color: var(--info);
}

body.asset-page-profile .main-wrapper .stat-card-warning .stat-icon{
    background: var(--warning-light);
    color: var(--warning);
}

body.asset-page-profile .main-wrapper .stat-content{
    flex: 1;
}

body.asset-page-profile .main-wrapper .stat-value{
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: var(--spacing-xs);
}

body.asset-page-profile .main-wrapper .stat-label{
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

body.asset-page-profile .main-wrapper .stat-sublabel{
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Badge Count */
body.asset-page-profile .main-wrapper .badge-count,
body.asset-page-profile .main-wrapper .post-count{
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 600;
}

/* Enhanced Badge Styles */
body.asset-page-profile .main-wrapper .badges-section{
    margin-bottom: var(--spacing-2xl);
}

body.asset-page-profile .main-wrapper .badges-section:last-child{
    margin-bottom: 0;
}

body.asset-page-profile .main-wrapper .badges-section-title{
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

body.asset-page-profile .main-wrapper .badges-section-title i{
    color: var(--primary);
}

body.asset-page-profile .main-wrapper .locked-section .badges-section-title i{
    color: var(--text-muted);
}

/* Badges Grid */
body.asset-page-profile .main-wrapper .badges-grid{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

body.asset-page-profile .main-wrapper .badge-card{
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    transition: var(--transition-base);
    cursor: help;
}

body.asset-page-profile .main-wrapper .badge-card:hover{
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Badge Cards - Enhanced */
body.asset-page-profile .main-wrapper .badge-earned{
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--primary-light) 100%);
    border-color: var(--primary);
}

body.asset-page-profile .main-wrapper .badge-locked{
    opacity: 0.6;
    filter: grayscale(100%);
}

body.asset-page-profile .main-wrapper .badge-locked:hover{
    opacity: 0.8;
    filter: grayscale(50%);
    background: var(--bg-secondary);
}

body.asset-page-profile .main-wrapper .badge-icon{
    font-size: 2rem;
    flex-shrink: 0;
}

body.asset-page-profile .main-wrapper .badge-info{
    flex: 1;
    min-width: 0;
}

body.asset-page-profile .main-wrapper .badge-name{
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
}

body.asset-page-profile .main-wrapper .badge-description{
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.4;
}

body.asset-page-profile .main-wrapper .badge-meta{
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-sm);
}

body.asset-page-profile .main-wrapper .badge-rarity{
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

body.asset-page-profile .main-wrapper .badge-rarity-common{
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

body.asset-page-profile .main-wrapper .badge-rarity-uncommon{
    background: var(--success-light);
    color: var(--success);
}

body.asset-page-profile .main-wrapper .badge-rarity-rare{
    background: var(--info-light);
    color: var(--info);
}

body.asset-page-profile .main-wrapper .badge-rarity-epic{
    background: var(--warning-light);
    color: var(--warning);
}

body.asset-page-profile .main-wrapper .badge-rarity-legendary{
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

body.asset-page-profile .main-wrapper .badge-points{
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--warning);
    font-weight: 600;
}

body.asset-page-profile .main-wrapper .badge-earned-date{
    margin-top: var(--spacing-sm);
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

body.asset-page-profile .main-wrapper .badge-requirement{
    margin-top: var(--spacing-sm);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--info-light);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--info);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* Badge Card Animation */
body.asset-page-profile .main-wrapper .badge-earned{
    animation: tn-profile-badgeShimmer 3s ease-in-out infinite;
}

@keyframes tn-profile-badgeShimmer {
    0%, 100% {
        box-shadow: 0 0 10px rgba(79, 70, 229, 0.1);
    }
    50% {
        box-shadow: 0 0 20px rgba(79, 70, 229, 0.3);
    }
}

/* Posts List */
body.asset-page-profile .main-wrapper .profile-posts-container{
    padding: 0;
}

body.asset-page-profile .main-wrapper .posts-list{
    display: flex;
    flex-direction: column;
    gap: 0;
}

body.asset-page-profile .main-wrapper .post-card{
    padding: var(--spacing-xl);
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition-fast);
}

body.asset-page-profile .main-wrapper .post-card:last-child{
    border-bottom: none;
}

body.asset-page-profile .main-wrapper .post-card:hover{
    background: var(--bg-secondary);
}

body.asset-page-profile .main-wrapper .post-card-header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

body.asset-page-profile .main-wrapper .post-category-badge{
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-fast);
}

body.asset-page-profile .main-wrapper .post-category-badge:hover{
    background: var(--primary);
    color: var(--text-inverse);
}

body.asset-page-profile .main-wrapper .post-card-time{
    font-size: 0.8125rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

body.asset-page-profile .main-wrapper .post-card-title{
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

body.asset-page-profile .main-wrapper .post-card-title a{
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

body.asset-page-profile .main-wrapper .post-card-title a:hover{
    color: var(--primary);
}

body.asset-page-profile .main-wrapper .post-card-excerpt{
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
    font-size: 0.9375rem;
}

body.asset-page-profile .main-wrapper .post-card-stats{
    display: flex;
    gap: var(--spacing-lg);
}

body.asset-page-profile .main-wrapper .post-stat{
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Activity Stats */
body.asset-page-profile .main-wrapper .activity-stats{
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

body.asset-page-profile .main-wrapper .activity-stat-item{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border-light);
}

body.asset-page-profile .main-wrapper .activity-stat-item:last-child{
    border-bottom: none;
}

body.asset-page-profile .main-wrapper .activity-stat-label{
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

body.asset-page-profile .main-wrapper .activity-stat-label i{
    color: var(--text-muted);
}

body.asset-page-profile .main-wrapper .activity-stat-value{
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1rem;
}

/* Empty State */
body.asset-page-profile .main-wrapper .empty-state{
    text-align: center;
    padding: var(--spacing-3xl) var(--spacing-xl);
}

body.asset-page-profile .main-wrapper .empty-icon{
    font-size: 4rem;
    color: var(--text-muted);
    opacity: 0.5;
    margin-bottom: var(--spacing-lg);
}

body.asset-page-profile .main-wrapper .empty-state h3{
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    font-size: 1.25rem;
}

body.asset-page-profile .main-wrapper .empty-state p{
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.9375rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    body.asset-page-profile .main-wrapper .profile-grid{
        grid-template-columns: 1fr;
    }

    body.asset-page-profile .main-wrapper .profile-sidebar{
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: var(--spacing-lg);
    }
}

@media (max-width: 768px) {
    body.asset-page-profile .main-wrapper .profile-header-content{
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0 var(--spacing-lg) var(--spacing-lg);
    }

    body.asset-page-profile .main-wrapper .profile-info{
        padding-top: var(--spacing-sm);
    }

    body.asset-page-profile .main-wrapper .profile-name-section{
        justify-content: center;
    }

    body.asset-page-profile .main-wrapper .profile-name{
        font-size: 1.5rem;
    }

    body.asset-page-profile .main-wrapper .profile-meta{
        justify-content: center;
    }

    body.asset-page-profile .main-wrapper .profile-actions{
        width: 100%;
        padding-top: var(--spacing-md);
    }

    body.asset-page-profile .main-wrapper .profile-actions .btn{
        width: 100%;
    }

    body.asset-page-profile .main-wrapper .stats-grid{
        grid-template-columns: repeat(2, 1fr);
    }

    body.asset-page-profile .main-wrapper .badges-grid{
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    body.asset-page-profile .main-wrapper .profile-cover{
        height: 120px;
    }

    body.asset-page-profile .main-wrapper .profile-avatar{
        width: 100px;
        height: 100px;
    }

    body.asset-page-profile .main-wrapper .profile-header-content{
        margin-top: -50px;
    }

    body.asset-page-profile .main-wrapper .stats-grid{
        grid-template-columns: 1fr;
    }
}
