.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background-color: transparent;
    min-height: 48px;
    cursor: pointer;
    user-select: none;
    box-sizing: border-box;
    width: 100%;
    transition: background-color 0.2s;
}

.file-item:last-child {
    border-bottom: none;
}

.file-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.file-item:active { background-color: rgba(255, 255, 255, 0.08); }

.song-link {
    text-decoration: none;
    color: inherit;
    flex: 1 1 auto;
    min-width: 0; /* แก้บั๊กขนาดล้นกรอบ ให้ flex หดตัวได้ */
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding-right: 12px;
}

.song-title {
    font-size: 15px;
    color: #ffffff;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 0 1 auto;
    max-width: 60%;
}

.artist-name {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5); /* สีจาง */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1 1 auto;
}

.file-item.visited { opacity: 0.6; }
.file-item.visited .song-title { color: #c0c0c0; }

.file-item.artist-link { 
    border-bottom: 1px solid rgba(152, 195, 121, 0.1);
    color: #98c379;
}

.file-item.artist-link:hover { 
    background-color: rgba(152, 195, 121, 0.1); 
}

.favorite-btn {
    background: transparent;
    border: none;
    display: flex;
    align-items: center; 
    justify-content: center;
    cursor: pointer;
    width: 36px; 
    height: 36px;
    padding: 0;
    flex: 0 0 auto;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.favorite-btn .star-icon {
    font-size: 18px; 
    transition: all 0.2s;
}

.star-icon.filled { color: #ffd700; }
.star-icon.outline { color: #ffffff; opacity: 0.2; }

.favorite-btn:hover .star-icon.outline { opacity: 0.8; transform: scale(1.1); }
.favorite-btn:hover .star-icon.filled { transform: scale(1.1); }

.file-item.favorite .song-title { color: #ffd700; }

.favorite-badge { display: none !important; }

.artist-song-count {
    font-size: 13px;
    color: #98c379;
    opacity: 0.8;
    margin-left: auto;
}

.file-item.artist-link:hover .artist-song-count { color: #fff; opacity: 1; }