/* PROFILE MODULE STYLES */

.profile-header-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.profile-top {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: #E2E8F0;
    overflow: hidden;
    position: relative;
    transition: background-color 0.3s ease;
}

.skeleton-text {
    background-color: #E2E8F0;
    color: transparent !important;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    user-select: none;
    display: inline-block;
}

.skeleton-text::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: skeleton-pulse 1.5s infinite;
}

.profile-avatar.loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: skeleton-pulse 1.5s infinite;
}

@keyframes skeleton-pulse {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

.profile-avatar img.loaded {
    opacity: 1;
}

.profile-info {
    flex: 1;
}

.profile-name {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--brand-dark);
    line-height: 1.2;
}

.profile-handle {
    font-size: 14px;
    color: var(--muted);
    font-weight: 500;
}

.profile-stats {
    display: flex;
    gap: 20px;
    border-top: 1px solid #F1F5F9;
    padding-top: 15px;
}

.profile-stats .stat {
    font-size: 14px;
    color: var(--text);
}

.profile-stats .stat strong {
    font-weight: 700;
    color: var(--brand-dark);
}

.profile-stats .stat span {
    color: var(--muted);
}

/* Avatar Upload Overlay */
.avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    cursor: pointer;
    color: white;
}

.profile-avatar:hover .avatar-overlay {
    opacity: 1;
}

/* Only show overlay if it's my profile (handled by JS toggling a class usually, but for now CSS hover is fine, we'll hide it in JS if not me) */
/* Better: We will add 'editable' class to .profile-avatar via JS if it's me */
.profile-avatar:not(.editable) .avatar-overlay {
    display: none !important;
}